码迷,mamicode.com
首页 > Web开发 > 详细

PHP启动时配置文件显示Loaded Configuration File => (none)

时间:2018-11-27 17:52:57      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:log   http   启动   追踪   使用   term   one   file   解决   

错误示下:
php -i | grep Load
Loaded Configuration File => (none)
libXML Loaded Version => 20901

解决办法:

使用strace去追踪一下:

#strace /usr/local/php/bin/php -i 2> /tmp/1.log

grep ‘php.ini‘ /tmp/1.log 显示如下信息:

open("/usr/local/php-7.0.23/bin/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/php/etc/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/php-7.0.23/bin/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/php/etc/php.ini", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/local/php/etc/php.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

把php.ini复制到/usr/local/php-7.0.23/bin/下,然后配置文件加载成功了。
#cp /usr/local/php-7.0.23/etc/php.ini /usr/local/php-7.0.23/bin/
技术分享图片

PHP启动时配置文件显示Loaded Configuration File => (none)

标签:log   http   启动   追踪   使用   term   one   file   解决   

原文地址:http://blog.51cto.com/13581826/2322745

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!