Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php_pdo_sqlsrv_71_nts_x86.dll specified module not found #200

Closed
dbasri opened this issue Dec 10, 2016 · 11 comments
Closed

php_pdo_sqlsrv_71_nts_x86.dll specified module not found #200

dbasri opened this issue Dec 10, 2016 · 11 comments
Labels

Comments

@dbasri
Copy link

dbasri commented Dec 10, 2016

Environment is a
Surface Book with Windows 10 including the anniversary update
PHP 7.1
SQL Server 2016 Developer
MS ODBC 13.1

PHP error log references the correct 71 DLL in the ext folder, but is throwing the same error as before the 71 drivers were loaded.

PHP Startup: Unable to load dynamic library 'C:\Util\PHP\7.1\ext\php_pdo_sqlsrv_71_nts_x86.dll' - The specified module could not be found in Unknown on line 0

@meet-bhagdev
Copy link
Contributor

Is the PHP 7.1 64 bit or 32 bit? 'Unable to load dynamic library' is usually thrown when the file path is not correct. Can you verify that the dll is in the correct folder?

@dbasri
Copy link
Author

dbasri commented Dec 12, 2016

PHP 7.1 is the 32-bit x86 version extracted from php-7.1.0-nts-Win32-VC14-x86.zip.

The correct full path and file name are being referenced in the the PHP error log as shown in the original post.

Thanks.

@Hadis-Fard
Copy link

Hadis-Fard commented Dec 12, 2016

Can you confirm that php.ini is correctly configured? “extension_dir” should be set to where the dll is dropped, and SQLSRV extension name should be added to the list of extensions by setting “extension=php_pdo_sqlsrv_71_nts.dll”.

@dbasri
Copy link
Author

dbasri commented Dec 12, 2016

It is. That was the first thing I checked.

From the PHP.INI:
extension_dir = "C:\Util\PHP\7.1\ext"

; Misc Extentions
extension=php_curl.dll
extension=php_mbstring.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_fileinfo.dll
extension=php_com_dotnet.dll
extension=php_pdo_sqlsrv_71_nts_x86.dll

From the error_log:
[10-Dec-2016 17:39:52 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Util\PHP\7.1\ext\php_pdo_sqlsrv_71_nts_x86.dll' - The specified module could not be found.
in Unknown on line 0
[10-Dec-2016 12:39:52 America/New_York] "could not find driver"

@Hadis-Fard
Copy link

I am not able to reproduce the issue, how are you getting the binaries? Can you try the 7.1 binaries from 4.1.4 release? also the name of the binary doesn't include _x86 at the end.

@meet-bhagdev
Copy link
Contributor

+1
@dbasri Can you change the extension=php_pdo_sqlsrv_71_nts_x86.dll to extension=php_pdo_sqlsrv_71_nts.dll

@dbasri
Copy link
Author

dbasri commented Dec 12, 2016

OK, egg on my face. The 7.0 drivers had _x86 in the DLL file name, but the 7.1 driver does not. That worked. Thank you very much.

@PsuFan
Copy link

PsuFan commented Feb 9, 2019

Had this issue as well. I was trying to use the nts (non-thread safe) when it was expecting ts (thread safe) version to be used!

@kamleshwebtech
Copy link

SQL Server DLL file with PHP 7.2 version

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

To download Windows DLLs for PHP 7.1 or above from the PECL repository, please go to the SQLSRV or PDO_SQLSRV PECL page.

@Cyzzaro
Copy link

Cyzzaro commented Jun 25, 2020

Many times it has to do with the way you relate within the "php.ini" file.
Did you try adding the ".dll" extension?

Example:
"extension = php_sqlsrv_74_ts_x64" should be left as "extension = php_sqlsrv_74_ts_x64.dll"

@arulananth
Copy link

extension=php_pdo_sqlsrv_80_nts_x64 its working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants