Home  >  Article  >  Backend Development  >  How to solve the problem that php cannot load the configuration file

How to solve the problem that php cannot load the configuration file

藏色散人
藏色散人Original
2021-03-25 09:07:122284browse

Solution to the problem that php cannot load the configuration file: first check whether the configuration file is loaded through the "php --ini" command; then modify "php7-9026.ini" to "php.ini".

How to solve the problem that php cannot load the configuration file

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

The php configuration file is not loaded A configuration

Recently, two versions of php, 5.6 and 7.1, were installed and configured on a server. It was 5.6 before. Everything works fine, 7.1 was installed later.

Question:

The configuration file named in the 7.1 program directory is: php7-9026.ini. At the same time, the php7 extension is installed and enabled in the configuration file.

Check that the extensions are loaded normally through phpinfo.

Example: The bcmatch extension is newly installed.

Check it in phpinfo, it has been loaded, and the program call can also be used normally.

Cannot be viewed in php -m

Viewed through php --ini Load the configuration file and find that the configuration file is not loaded.

I understood the problem instantly.

The solution is to modify php7-9026.ini to php.ini.

Use bc to test normally

[Recommended learning: PHP video tutorial]

The above is the detailed content of How to solve the problem that php cannot load the configuration file. 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