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

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

不言
Release: 2023-03-25 07:16:01
Original
9757 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template