Home > Article > Backend Development > Solution to Loaded Configuration File(none) in phpinfo()
This article mainly introduces to you the solution to the Loaded Configuration File(none) problem in phpinfo(). Friends in need can refer to it. Let’s take a look together.
Preface
Compile php7 separately and install it in /usr/local/php7/. Today, the development plug-in modified the configuration information of php.ini. But nothing works.
Troubleshooting
View configuration information through phpinfo()
:
Discover Loaded Configuration File => (none)
, indicating that the php.ini file is not loaded. However, the file /usr/local/php7/etc/php.ini does exist.
Solution
Use strace to track it:
strace /usr/local/php7/sbin/php-fpm -i 2>1.log
Open the file and discover :
It will look for /usr/local/lib/php.ini
, I don’t know why, I compiled it with settings --with-config-file-path=/xxx/xxx
. Anyway, I found the specific path and copied php.ini to solve it.
Also Istrace /usr/local/php7/bin/php -i 2>1.log
found that if it is not php-fpm but php, it will find / usr/local/php7/bin/php.ini
, the reason is unknown.
Related recommendations:
Under Linux, solve the problem of inconsistent versions of php -v and phpinfo
A brief discussion on what can be obtained from phpinfo What valuable information
The above is the detailed content of Solution to Loaded Configuration File(none) in phpinfo(). For more information, please follow other related articles on the PHP Chinese website!