Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to php_mysql.dll?

Tags:

php

iis

iis-7.5

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?

like image 586
DarkLite1 Avatar asked Jan 20 '16 15:01

DarkLite1


3 Answers

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 
like image 107
DarkLite1 Avatar answered Sep 22 '22 22:09

DarkLite1


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

like image 21
Cihan Uygun Avatar answered Sep 22 '22 22:09

Cihan Uygun


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
like image 45
B3none Avatar answered Sep 22 '22 22:09

B3none