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;