2

I'm trying to put together a page that can submit data from a form to an MSSQL database via PHP. I've got PHP installed successfully (phpinfo() runs fine even on a remote computer) but it will not load the sqlsrv extension. I know that I'm editing the right php.ini file because I have another extension added (wincache) and it is loading fine, confirmed with both phpinfo() and get_loaded_extensions().

The logs aren't telling me anything. PHP Manager on IIS is telling me that the sqlsrv extension files are enabled. I've restarted the website, the server, and the computer, and nothing's working.

I'm using PHP 7.1.1 on a Windows 7 Ultimate machine. It's running in x64 mode, Non-Thread Safe. I've made sure that the extension files I enabled are the x64, non-thread-safe ones. I don't know what else to check or what more info I need to provide.

EDIT: I ran php-cgi.exe as this page suggested, and it came out with the error mesages:

[31-Mar-2017 22:38:12 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files\iis express\PHP\v7.1\ext\php_sqlsrv_7_nts_x64.dll' - The specified procedure could not be found.
 in Unknown on line 0
[31-Mar-2017 22:38:17 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files\iis express\PHP\v7.1\ext\php_pdo_sqlsrv_7_nts_x64.dll' - The specified procedure could not be found.
 in Unknown on line 0

Does this mean that the problem is in the extension DLLs themselves? How would I even go about fixing that?

2 Answers 2

0

It looks like the slqsrv extension doesn't yet support PHP 7.1

At the time of writing (July 2017) it looks like the preview version is available for download so I guess the production version can't be far away

0

I'm sure you figured it out by now, but for anyone else getting errors like those, make sure you are using the correct version of the DLL ie. php_sqlsrv_VERSION_THREADSAFETY_ARCHITECTURE.dll. So put php_sqlsrv_71_nts_x86.dll or the one that is compatible with your machine and setup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .