Msphpsql: Failed to load ext\php_pdo_sqlsrv_74_nts_x64

Created on 9 Apr 2020  路  7Comments  路  Source: microsoft/msphpsql

PHP can not seem to load these driver files. REceive the error:

PHP Warning: PHP Startup: Failed to load ext\php_pdo_sqlsrv_74_nts_x64, The system cannot find the file specified.

PHP Warning: PHP Startup: Failed to load ext\php_sqlsrv_74_nts_x64, The system cannot find the file specified.

PHP 7.3.x has no issues loading the applicable SQL Drivers for that version. Seems others are having the issue with 7.4 as well.

https://stackoverflow.com/questions/60603495/php-sqlsrv-extension-not-loading

Most helpful comment

As promised, I tested adding the .dll to the extension= in the PHP.ini file and IT WORKED! NEver needed to do that before but I honestly don't care. As long as I have a solution. Thank you so very much for your help yitam!!

All 7 comments

Hi @ZackInMA to help us to figure out the problem, please do not skip the issue template and answer the questions.

+## PHP Driver version or file name
php_pdo_sqlsrv_74_nts_x64 and php_sqlsrv_74_nts_x64

+## SQL Server version
Any version. MS SQL driver for PHP will not load so can't even connect to SQL

+## Client operating system
Win 10 1909

+## PHP version
7.4.4 x64 (NTS)

+## Microsoft ODBC Driver version
17.5.2.1

  • +## Table schema
    N/A

    +## Problem description
    PHP won;t load the MS SQL server drivers. See above error logged in the PHP startup log.

    +## Expected behavior and actual behavior
    PHP should load the drivers without logging issues in the error log and it should be able to connector to a SQL server

+## Repro code or steps to reproduce
Download PHP x64 NTS version
try to get the x64 NTS php_sqlsrv_74_nts_x64 and php_pdo_sqlsrv_74_nts_x64 to load.

PHP.ini has the correct path to the extension directory. Other extensions load fine. PHPInfo.php lists the correct path to the PHP extension directory.

Thanks and which version of php drivers are you using?

5.8.
This one.
https://docs.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver15
Which I believe is the only version that supports PHP 7.4.x

Yes you're right @ZackInMA
I just downloaded it myself but have no problem after appending the following lines to php.ini:

extension_dir=ext\
extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll

image

I notice you have the .dll file extension on the file names for the extensions. I don't have those and will give that a try. I never had to have them in there before though and none of the other extensions that come with PHP have the file extension as well. But it's worth a try. I'll report back soon.

As promised, I tested adding the .dll to the extension= in the PHP.ini file and IT WORKED! NEver needed to do that before but I honestly don't care. As long as I have a solution. Thank you so very much for your help yitam!!

Was this page helpful?
0 / 5 - 0 ratings