Home>Article>Backend Development> Solution to Loaded Configuration File(none) in phpinfo()

Solution to Loaded Configuration File(none) in phpinfo()

不言
不言 Original
2018-04-28 15:32:32 9540browse

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 throughphpinfo():

DiscoverLoaded 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.logfound 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn