我配置/讓/使PHP在哪裏已經安裝在系統上安裝PHP:爲什麼我的php.ini找不到?
./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
(一切OK),但是,當我輸入PHP --ini(內部的/ opt/PHP /箱),我得到舊東西:
> 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,
爲什麼/我該如何解決這個問題?
我的.bashrc:
如果[-d 「/選擇/ PHP/BIN」] & & [-d 「/選擇/ PHP/sbin目錄」];然後 PATH = 「$ PATH中:/ opt/PHP /斌:/選擇/ PHP/BIN」
我的PHP配置看起來不錯:
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]
,但... myphp.ini呢不,似乎我的--with-config-file-path = PATH(設置尋找php.ini的路徑,默認爲PREFIX/lib。)莫名其妙地不工作?
是否在'/選擇/ PHP的輸入'./php --ini'/bin'改變什麼? – Felix 2011-04-08 22:23:58
@Felix可能是對的。 'php'和'。/ php'是兩個不同的東西。 'php'取得$ PATH中的一個(可能是/ usr/bin/php),而'。/ php'取得了cwd中的那個。 – netcoder 2011-04-08 22:28:01
是的...它顯示了另一箇舊的位置...../usr/local/lib ...雖然php的時間是我建立它的時間(我改變並導出了bashrc路徑 – edelwater 2011-04-08 22:29:05