Php cannot load php_mysql.dll, php_mysqli.dll solution _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
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.

...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.