doumou1864 2011-04-08 22:20
浏览 71
已采纳

为什么我的php.ini找不到?

I config/make/make install php on a system where php is already installed:

 ./configure --prefix=/opt/php
 --with-config-file-path=/opt/php/etc --with-config-file-scan-dir=/opt/php/etc/php.d
 --enable-fpm --with-fpm-user=ec2-user --with-fpm-group=ec2-user --disable-debug 
 --enable-exif --with-curl --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-
 pdo-mysql=mysqlnd --with-zlib --enable-zip --enable-bcmath --enable-calendar 
 --enable-ftp --with-mhash --with-openssl --with-mcrypt --enable-mbstring --enable-
 mbregex --with-gd --with-jpeg-dir --with-png-dir

(all ok) however, when I type php --ini (inside /opt/php/bin) I get the old stuff:

> Configuration File (php.ini) Path:
> /etc Loaded Configuration File:       
> /etc/php.ini Scan for additional .ini
> files in: /etc/php.d Additional .ini
> files parsed:      /etc/php.d/apc.ini,
> /etc/php.d/curl.ini,
> /etc/php.d/fileinfo.ini,
> /etc/php.d/json.ini,
> /etc/php.d/mbstring.ini,
> /etc/php.d/phar.ini,

why / how can i fix this?

my bashrc:

if [ -d "/opt/php/bin"] && [ -d "/opt/php/sbin" ]; then PATH="$path:/opt/php/bin:/opt/php/bin"

my php-config looks ok:

Usage: ./php-config [OPTION]
Options:
  --prefix            [/opt/php]
  --includes          [-I/opt/php/include/php -I/opt/php/include/php/main -I/opt/php/include/php/TSRM -I/opt/php/include/php/Zend -I/opt/php/include/php/ext -I/opt/php/include/php/ext/date/lib]
  --ldflags           []
  --libs              [-lcrypt   -lz -lcrypt -lrt -lmcrypt -lltdl -lpng -lz -ljpeg -lcurl -lz -lrt -lm -ldl -lnsl  -lrt -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt ]
  --extension-dir     [/opt/php/lib/php/extensions/no-debug-non-zts-20090626]
  --include-dir       [/opt/php/include/php]
  --php-binary        [/opt/php/bin/php]
  --php-sapis         [cli fpm]
  --configure-options [--prefix=/opt/php --with-config-file-path=/opt/php/etc --with-config-file-scan-dir=/opt/php/etc/php.d --enable-fpm --with-fpm-user=ec2-user --with-fpm-group=ec2-user --disable-debug --enable-exif --with-curl --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib --enable-zip --enable-bcmath --enable-calendar --enable-ftp --with-mhash --with-openssl --with-mcrypt --enable-mbstring --enable-mbregex --with-gd --with-jpeg-dir --with-png-dir]
  --version           [5.3.5]
  --vernum            [50305]

but... myphp.ini does not, it seems my --with-config-file-path=PATH (Sets the path in which to look for php.ini, defaults to PREFIX/lib.) somehow is not working?

  • 写回答

4条回答 默认 最新

  • dongqiongzheng0615 2011-04-09 07:51
    关注

    I now had 5.3.5. I wget-ed 5.3.6, configure, make, make install...

    and the .ini settings were ok.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c