php安装 Loaded Configuration File :none

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_36663951/article/details/83344293

'./configure'  '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/php/etc' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--with-mysql=/usr/local/mysql' '--with-mysql-sock=/tmp' '--with-libxml-dir' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-freetype-dir' '--with-iconv-dir' '--with-zlib-dir' '--with-mcrypt=/usr/local/libmcrypt' '--enable-soap' '--enable-gd-native-ttf' '--enable-ftp' '--enable-mbstring' '--enable-exif' '--disable-ipv6' '--with-pear' '--with-curl' '--with-openssl'

Loaded Configuration File :none


实在没有办法,只能使用strace去追踪一下:
strace  /usr/local/php/bin/php -i 2> /tmp/1.log
grep 'php.ini' /tmp/1.log 显示如下信息:
open("/usr/local/php/bin/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "Configuration File (php.ini) Pat"..., 33) = 33


此时,发现问题,php竟然去/usr/local/php/bin/ 下去找php.ini了。
这是为什么呢? 暂时我还无法解释,之后问题就容易解决了,直接把 php.ini 拷贝至/usr/local/lib即可

猜你喜欢

转载自blog.csdn.net/qq_36663951/article/details/83344293