Home  >  Article  >  Backend Development  >  What should I do if mysql is not loaded in php?

What should I do if mysql is not loaded in php?

王林
王林Original
2021-06-24 11:25:221987browse

Solution to php not loading mysql: First copy libmysql.dll to the system32 folder; then load the libmysql.dll file in the httpd.conf configuration file; finally restart the server.

What should I do if mysql is not loaded in php?

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

During the actual learning process, we may encounter situations where the mysql module cannot be loaded. If we happen to encounter such a problem, don’t panic, let’s introduce the solution below.

The solution steps are as follows:

First copy libmysql.dll in the PHP root directory to c:\Windows\system32

Then copy conf\httpd in the Apache directory. Load libmysql.dll in conf

LoadFIle "x:\php\libmysql.dll" //Load libmysql.dll

LoadModule php5_module "x:\php\php5apache2_2.dll" //Load php module

Finally restart the server.

Related video sharing: php video tutorial

The above is the detailed content of What should I do if mysql is not loaded in php?. 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