What happened to php_mysql.dll?

[亡魂溺海] 提交于 2019-12-03 06:50:14

问题


Finally, after hours of strugling, I finished installing PHP 7.02 on our IIS 7.5 Windows Server 2008. All functions properly except for one error:

[20-Jan-2016 15:19:26 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\PHP\php-7.0.2-nts-Win32-VC14-x64\ext\php_mysql.dll' - The specified module could not be found. in Unknown on line 0

When checking the downloaded zip-file op PHP 7.02 it's clear that the folder ext doesn't contain a file called php_mysql.dll.

So my question is where can we get this file to avoid this error?


回答1:


Thanks to the comment of Naruto I figured out that the dynamic loading of all the modules in the php\ext folder wasn't the culprit. Because the file php_mysql.dll wasn't in that folder, so it couldn't be loaded from there. After further analyses it seems that in the latest PHP (7.02) download for Windows 64-bit the php.ini file still contains this:

[PHP_MYSQL]
extension=php_mysql.dll

After commenting out the section the error in the log file was gone. As we obviously can't load that dll file anymore.

;[PHP_MYSQL]
;extension=php_mysql.dll



回答2:


mysql extension was deprecated on v5.5 and removed on v7 please check out link below, https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7




回答3:


For PHP 7.2 when using PDO for MySQL I had to un-comment the following line:

;extension=pdo_mysql

extension=pdo_mysql

It's worth noting that there are other versions of the PDO extension also commented out:

;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite


来源:https://stackoverflow.com/questions/34903896/what-happened-to-php-mysql-dll

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!