Home  >  Article  >  Backend Development  >  What should I do if php cannot load the extension?

What should I do if php cannot load the extension?

藏色散人
藏色散人Original
2020-08-20 10:35:233110browse

Solution to the problem that php cannot load the extension: first check whether the path of "extension_dir" in "php.ini" is correct; then add "D:\php5.5.38" to the system variable; finally check apache configuration and make modifications.

What should I do if php cannot load the extension?

Recommendation: "PHP Video Tutorial"

There will be some problems when modifying php.ini A small problem causes the extension to fail to load.

For example, php_mysql.dll is clearly enabled in php.ini, but when running the project, an error is reported saying that php_mysql is not supported. In this case, the system must not be able to find the file php_mysql.dll

First check whether the path of extension_dir in php.ini is correct. Pay attention to the direction of the slash.

Add D:\php5.5.38 and D:\php5.5.38 \ext

# to the system variables. ##Then check the configuration in apache

If the configuration is correct but an error is still reported, and the loaded configuration file in the picture below is not displayed

Run phpinfo.php as shown in the picture

Indicates that the system can load the php.ini file. If not, it means that the file has not been loaded.


Finally, there is a detail to note that php.ini is copied and modified based on the php.ini-development file. If there are spaces left when deleting development, php.ini cannot be loaded.

For example, if there are spaces after ini, the file cannot be loaded.

The above is the detailed content of What should I do if php cannot load the extension?. 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