PHP cannot load Php_mysql.dll, Php_mysqli.dll workaround _php Tutorial

Source: Internet
Author: User
Today just configured PHP environment results in PHP startup can not load Php_mysql.dll, php_mysqli.dll, this I configure is no problem ah, let me introduce you to Php_mysql.dll, Php_ Mysqli.dll cannot load the workaround.

When I started the PHP environment today, I found that the MySQL module function could not be used and the website returned 500 errors. Viewed under Apache under the error log. 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 did not successfully load Php_mysql.dll this file

First make sure that the Extension_dir value in the PHP configuration file php.ini is correct, preferably with an absolute address.

Such as
Extension_dir = "D:/wwwserver/php/ext"

If the other DLLs are loaded successfully, and the Php_mysql.dll, Php_mysqli.dll load is unsuccessful.

The following two ways are resolved:

(1), the PHP directory under the Libmysql.dll copy to the Apache directory in the bin subdirectory
(2), Apache configuration file httpd.conf Add the following paragraph
LoadFile "D:/wwwserver/php/libmysql.dll"

PS: Above code loadfile "D:/wwwserver/php/libmysql.dll" where "d:/wwwserver/php/" is the Directory of PHP
PS: After restarting or not, it may be the version of the problem, such as Apache do not use the VC9 version of PHP. Novice recommends the Next button to install the package

A second solution is attached


Apache under

For example, my Apache is in D, and the catalogue is D:/severs/apache.
The directory for PHP is D:/SERVERS/PHP5
So, copy the D:/servers/php5/libmysql.dll to the D:/servers/apache/bin directory.
Restart Apache, the problem is solved! ~~

Under IIS:
Copy the Libmysql.dll in the PHP directory into the c:/windows/system32/directory, and then restart IIS. If the prompt is in use, you can stop IIS (Iisreset/stop) before

Of course, other DLL files are also the same solution, in general, the first check the PHP directory permissions, the general everyone read, browse and run.

http://www.bkjia.com/PHPjc/633216.html www.bkjia.com true http://www.bkjia.com/PHPjc/633216.html techarticle today just configured PHP environment results in PHP startup can not load Php_mysql.dll, php_mysqli.dll, this I configure is no problem ah, let me introduce you to Php_mysql.dll, php_my ...

  • 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.