Php cannot load php_mysql.dll and php_mysqli.dll. The php environment just configured today cannot load php_mysql.dll and php_mysqli.dll at php startup. This configuration is correct, next I will introduce you to php_mysql.dll and php_my. The php environment just configured today cannot load php_mysql.dll and php_mysqli.dll at php startup. This configuration is correct, next I will introduce the solution for loading php_mysql.dll and php_mysqli.dll.
When I started the php environment today, I found that mysql module functions were not available and the website returned the 500 error. View the error log in apache. The following error message is found:
PHP Warning: PHP Startup: Unable to load dynamic library 'd: /wwwserver/php/ext // php_mysql.dll '-/xd5/xd2/xb2/xbb/xb5/xbd/xd6/xb8/xb6/xa8/xb5/xc4/xc4/xa3/ xbf/xe9/xa1/xa3/r/n in Unknown on line 0
This indicates that php has not successfully loaded the php_mysql.dll file.
First, make sure that the extension_dir value in the php configuration file php. ini is correct. it is best to use an absolute address.
For example
Extension_dir = "D:/wwwserver/php/ext"
If other dll files are loaded successfully, php_mysql.dll and php_mysqli.dll files are not loaded successfully.
The solution is as follows:
(1) copy libmysql. dll under the php directory to the bin subdirectory under the apache Directory.
(2) add the following section to the apache configuration file httpd. conf:
LoadFile "D:/wwwserver/php/libmysql. dll"
Ps: The above code LoadFile "D:/wwwserver/php/libmysql. dll" where "D:/wwwserver/php/" is the php Directory
Ps: it will not work after restart. it may be a version Issue. for example, do not use php of vc9 in apache. It is recommended that you use the next one-click installation package.
Add another solution
Under apache
For example, if my apache is installed on the D drive, the directory is D:/severs/apache.
PHP directory is D:/servers/php5
In this way, copy D:/servers/php5/libmysql. dll to the directory D:/servers/apache/bin.
Restart apache to solve the problem !~~
Under iis:
Copy libmysql. dll in the php directory to the c:/windows/system32/directory, and then restart iis. If you are prompted to be in use, stop iis (iisreset/stop) first.
Of course, the prompt that other dll files are the same solution. Generally, the php directory permission is checked first. generally, everyone can read and browse and run.
...