PHP 7 on IIS: Call_user_function could not be located
Solution 1
Confirmed what @MEmerson said above. You need to downgrade PHP to 7.0.X(?) - I used 7.0.12.
Complete Setup:
- Windows 10 Pro
- PHP X64 7.0.12 TS (Bitnami WAMP Stack)
- Microsoft ODBC Driver 13.1 for SQL Server (https://msdn.microsoft.com/en-us/library/mt703139(v=sql.1).aspx)
- Microsoft Drivers for PHP for SQL Server 4.0 (https://www.microsoft.com/en-ca/download/details.aspx?id=20098)
Same drivers with PHP X64 7.1.0 produced the error you are getting.
Solution 2
Microsoft Drivers 4.3 for PHP for SQL Server are now available. These drivers contains files for PHP 7.1 - php_pdo_sqlsrv_71_nts_x64.dll etc. I've successfully managed to connect to SQL server.
Solution 3
Had similar error when tried to use httpd (Apache), PHP 7.2.2, Microsoft ODBC driver 11 on MS Windows Server 2012. The text of error was:
The procedure entry point call_user_function could not be located in the dynamic link library php_pdo_sqlsrv_7_ts_x64.dll.
when I called php -m
to check modules.
So I have downloaded Windows-7.2.zip from https://github.com/Microsoft/msphpsql/releases and used thread-safe dlls from it.
php -m
works now as it should without giving error.
Solution 4
Same as NoCopy
- Windows Server 2012
- php-7.0.15-Win32-VC14-x64.zip from (http://windows.php.net/download)
- Visual C++ Redistributable for Visual Studio 2015 (https://www.microsoft.com/en-us/download/details.aspx?id=48145)
- Microsoft ODBC Driver 13.1 for SQL Server
- Microsoft Drivers for PHP for SQL Server 4.0
7.1.x still a No,NO from Microsoft
MEmerson
By Day: operate the power transmission system By Night: PHP coder working with Symfony 3 on a project that I hope to market
Updated on June 28, 2022Comments
-
MEmerson almost 2 years
I am trying to use the Microsoft SQL Server drivers with PHP 7.1 Not Thread Safe x64 on Windows 2012 R2 64-bit server.
No matter what I do I am getting an error when I run php from a admin command prompt
Warning: PHP Startup: Unable to load dynamic library 'ext\php_pdo_sqlsrv_7_nts.dll' - The specified procedure could not be found.
Additionally it display a windows pop up that states
The procedure entry point call_user_function could not be located in the dynamic link library C:\PHP7\ext\php_pdo_dqlsrv7_nts_x64.dll
I have verified that the php.ini is pointing to a file that exists, because if I rename the .dll file, the error messages changes to "specified module could not be found", instead of specified procedure.
I have installed Microsoft Visual C++ runtime 15 x64 as required by PHP 7.
I have installed Microsoft ODBC driver 13 as required by the Microsoft SQL Server driver.
I have rebooted the server twice.
There is nothing else I can think to even try. The Microsoft WinCache.dll is loading and working fine in PHP, as verified by phpinfo.
-
bkwdesign over 4 yearsI'm also getting near same errors on my Win10 box trying to get PHP 7.3.10 to use redis v3.1.0
-
-
bansi over 7 yearsGood for Windows 8.1 also.
-
loki over 7 yearsPlease explain a bit more what your solution is about
-
Micah over 5 yearsMicrosoft Drivers 5.3 for PHP for SQL Server for PHP 7.2 - php_pdo_sqlsrv_72_nts_x64.dll