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

What should I do if php cannot enable the mysql extension?

王林
王林Original
2021-07-05 13:53:242353browse

The solution to the problem that php cannot open the mysql extension is to edit the php.ini configuration file and remove the semicolon in front of php_pdo_mysql.dll. Then set the extension directory in the php.ini file. Finally, add the php path to the apache configuration file.

What should I do if php cannot enable the mysql extension?

The operating environment of this article: windows10 system, php 7.3, thinkpad t480 computer.

After upgrading php7, the following problem occurred when opening the applet:

What should I do if php cannot enable the mysql extension?

Here I have removed extension=php_pdo_mysql in php.ini. ";"

in front of dll and add extension_dir = "E:\softwares\wamp\php-7.1.8_VC14"

E:\softwares\wamp\php in php.ini -7.1.8_VC14 is your php path, and php_pdo_mysql.dll exists in the ext folder.

If there are no problems with the above, it is very likely that there is a problem with our apache configuration file.

Solution:

We only need to add the PHP path PHPIniDir "D:/php" to the apache configuration file httpd.conf.

What should I do if php cannot enable the mysql extension?

Learning video related tutorials: php video tutorial

The above is the detailed content of What should I do if php cannot enable the mysql 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