Skip to content
Advertisement

PHP Warning PHP Startup Unable to load dynamic library php_pdo_sqlsrv_7_ts_x64.dll

  • OS: Windows 8.1
  • Arch: x64
  • php: PHP 7.1.6
  • mssql: Mssql Server 2014 express
  • driver: SQLSRV 4.0
  • IDE: PhpStorm

I’m trying to get mssql drivers to work. I downloaded the pdo driver from microsoft, put the file php_pdo_sqlsrv_7_nts_x64.dll into C:Program FilesPHPext and edited php.ini to add extension=php_pdo_sqlsrv_7_nts_x64.dll to it.

This is the result:

$ php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'C:Program FilesPHPextphp_pdo_sqlsrv_7_nts_x64.dll' - The specified procedure could not be found.
 in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'C:Program FilesPHPextphp_sqlsrv_7_nts_x64.dll.dll' - The specified procedure could not be found.
 in Unknown on line 0
PHP 7.1.6 (cli) (built: Jun  8 2017 01:53:41) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

Probable duplicate of this: PHP Warning: PHP Startup: Unable to load dynamic library php_pdo_mssql.dll

But that one’s never answered and four years old.

Advertisement

Answer

It’s a good idea to look at the release information.
That way you can see what version it supports.

https://github.com/Microsoft/msphpsql/releases

In my case the mssql driver is still one minor version behind php’s latest stable version, so I have to downgrade my php from 7.1 to 7.0.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement