PHP 7 on IIS: Call_user_function could not be found

I am trying to use Microsoft SQL Server drivers with PHP 7.1 Not Thread Safe x64 on a 64-bit Windows 2012 R2 server.

No matter what I do, I get an error when starting php from admin command line

Warning: starting PHP: it is not possible to load the dynamic library 'ext \ php_pdo_sqlsrv_7_nts.dll' - the specified procedure could not be found.

In addition, it displays pop-ups that indicate

The entry point of the call_user_function system cannot be in the dynamic link library C: \ PHP7 \ ext \ php_pdo_dqlsrv7_nts_x64.dll

I checked that php.ini points to a file that exists, because if I rename the .dll file, the error messages will change to "the specified module cannot be found" instead of the specified procedure.

I installed the Microsoft Visual C ++ 15 x64 environment as required by PHP 7.

I installed the Microsoft ODBC 13 driver as required by the Microsoft SQL Server driver.

I rebooted the server twice.

There is nothing that I could even try. Microsoft WinCache.dll loads and works fine in PHP, as verified by phpinfo.

+5
source share
4 answers

Confirmed by @MEmerson above. You need to downgrade PHP to 7.0.X (?) - I used 7.0.12.

Full customization:

The same drivers with PHP X64 7.1.0 created the error you are getting.

+5
source

Microsoft Drivers 4.3 for PHP for SQL Server is now available . These drivers contain files for PHP 7.1 - php_pdo_sqlsrv_71_nts_x64.dll, etc. I was able to successfully connect to the SQL server.

+7
source

Same as NoCopy

7.1.x still no No, NO from Microsoft

+1
source

I had a similar error when trying to use httpd (Apache), PHP 7.2.2, Microsoft ODBC 11 driver on MS Windows Server 2012. Error text:

The call_user_function entry point cannot be located in the php_pdo_sqlsrv_7_ts_x64.dll dynamic link library.

when I called php -m to check the modules.

So, I downloaded Windows-7.2.zip from https://github.com/Microsoft/msphpsql/releases and used thread safe DLLs from it.

php -m works as expected without providing an error.

0
source

Source: https://habr.com/ru/post/1261068/


All Articles