Reputation: 23
When I start XAMPP it gives me the following error when trying to load the SQL Server driver for PHP.
The procedure entry point _zend_hash_index_update@@24 could not be located in the dynamic link library D:\xampp\php\ext\php_sqlsrv_72_ts_x64.dll.
I have tried downloading both the Microsoft SQL Server Driver 4.0 and 5.6 for php and use the php_sqlsrv_7_ts_x64.dll and php_sqlsrv_72_ts_x64.dll in the extension directory and add them to php.ini.
I found this posting related to this error:
PHP 7 on IIS: Call_user_function could not be located
In the system requirements, for MSSQL driver 4.0 it states that this driver is good for PHP 7.0+. In trying 5.6, I found this posting saying that it's support for PHP 7.3:
https://blogs.msdn.microsoft.com/sqlphp/2019/03/01/drivers-5-6-for-php-for-sql-server-released/
Either way, I still receive the same error. Is there something else I need to be checking?
Upvotes: 2
Views: 11791
Reputation: 175
In short go to https://learn.microsoft.com/en-us/sql/connect/php/microsoft-php-drivers-for-sql-server-support-matrix?view=sql-server-2017#php-version-support.
Then compare your php version against driver version in a table displayed.
Finally download a correct version, that is all.
Upvotes: 3
Reputation: 31
use the 7.3 one instead (php_sqlsrv_73_...
)
I was receiving this error also, trying to load php_sqlsrv_7_nts_x86
for php-7.3.8-nts-Win32-VC15-x86
.
If you look at this support matrix on the microsoft site you'll see plenty of other options for drivers that support your PHP version.
I downloaded the latest, the SQLSRV561 package. That did the trick.
So Just to be clear,
I loaded php_sqlsrv_73_nts_x86.dll
(from SQLSRV5.6.EXE) instead of php_sqlsrv_7_nts_x86
(from SQLSRV4.0.EXE), and that fixed the problem.
Upvotes: 2