Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I′m currently trying to enable the pdo_sqlsrv extension.

I downloaded the drivers from here: https://docs.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver15

And then added them to the folder php/ext/

After that i added the following line to the php.ini

extension=php_sqlsrv_72_ts.dll

The error log shows me the following:

[12-Jan-2021 16:06:23 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_sqlsrv_72_ts.dll' (tried: C:phpextphp_sqlsrv_72_ts.dll (Impossível localizar o módulo especificado), C:phpextphp_php_sqlsrv_72_ts.dll.dll (Impossível localizar o módulo especificado)) in Unknown on line 0

I already tried also just add the following line:

extension=php_pdo_sqlsrv

The error log file shows:

[12-Jan-2021 16:17:55 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv' (tried: C:phpextphp_pdo_sqlsrv (Impossível localizar o módulo especificado), C:phpextphp_php_pdo_sqlsrv.dll (Impossível localizar o módulo especificado)) in Unknown on line 0

Note: Im using PHP with IIS. Also others drivers like pdo_odbc work. I only have problems with this one.

After following suggesting from comments:

I isntalled the drivers from the following link: pecl.php.net/package/pdo_sqlsrv/5.9.0beta2/windows

Added to php.ini

extension=pdo_sqlsrv

And error log file stills says it can't find the module:

[12-Jan-2021 20:59:17 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_sqlsrv' (tried: C:phpextpdo_sqlsrv (Impossível localizar o módulo especificado), C:phpextphp_pdo_sqlsrv.dll (Impossível localizar o módulo especificado)) in Unknown on line 0

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

From what I read after the release of PHP 8, the dll extentsion for pdo_sqlsrv won't be out until the end of January. I had the same issue when 7.4 rolled out and I had to wait a couple months for the appropriate dll to be release for our Windows server. I'll try and remember to come back and update with the link if I find it released.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...