PHP installation error: Unable to load dynamic library

Source: Internet
Author: User
Tags apache error log

I haven't used PHP for a long time

Today I installed it.

Unable to load dynamic library 'C:/program files/PHP/EXT/php_mysql.dll

 

Cause: php_mysql.dll depends on libmysql. dll

Although this file exists in the PHP installation directory, and I also add php_mysql.dll to the environment variable, it still does not work.

Unknown reason.

 

Solution:

Copy php_mysql.dll to system32

 

Php_mysql.dll

You can find it in the installation directory of MySQL or PHP.

 

 

---------------------------------------------------

The cause has been identified:

For newly set Environment Variables

You need to restart to make it effective. You can see this through the phpinfo () function.

 

 

 

// I flipped through the original learning logs. It took so much time to solve the same problem.

Posted together

Apache Error Log prompts unable to load dynamic library... php_mysql.dll?
Dizzy, Apache Error Log always prompts unable to load dynamic library ..., for example, php_mysql.dll, php_mysql.dll is placed in extension_dir (= "D:/programs/PHP/php-5.2.3/EXT") under! And the php_gd2.dll in the same directory can be correctly loaded...
 
It took a long time to discover:
 
The correct loading of php_mysql.dll requires libmysql. DLL, libmysql. DLL is in the PHP installation directory (D:/programs/PHP/php-5.2.3/), not in the D:/programs/PHP/php-5.2.3/EXT directory, therefore, libmysql cannot be found. DLL, always prompts that php_mysql.dll cannot be loaded
 
Solution:
1. Copy the libmysql. dll file to the % WINDIR %/system32 directory;
2. Add the PHP installation directory (D:/programs/PHP/php-5.2.3/) to the system % PATH % environment variable;

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.