5

I would like to change php version to 7.1 and i have an error:

PHP Warning:  PHP Startup: Unable to load dynamic library 

    'C:\Program Files\PHP\v7.1\ext\php_sqlsrv_7_nts_x86.dll' - The specified procedure could not be found.
     in Unknown on line 0

First think. This is not duplicate question because i checked many similar questions. I'm using IIS, PHP 7.1, and SQL server (thats why i need sqlsrv drivers). I checked php.ini file aready and i change extension-dir path to full path but nothing happens. (Logically if path is a problem why it works with other extensions? ). It works with PHP 7.0.7 (all enabled extensions is exactly same)

Update: still won't work but i tried to paste path from error message to file explorer and file already there.

2
  • Check if your configuration is 64 bits or 32bits , it is trying to load a 32bits version , maybe your php is 64 bits version. You can download it on php site pecl.php.net Commented Dec 2, 2016 at 10:40
  • @Fky PHP is 7.1 x86 nts, pdo as you can see is also x86nts Commented Dec 2, 2016 at 10:48

3 Answers 3

6

Turns out that PHP 7.0 and PHP 7.1 are not compatible and the mssql PDO drivers are for 7.0.

Github issue here

Also ensure you including the right 64/86 and ts/nts version.

Sign up to request clarification or add additional context in comments.

Comments

6

As from Toby Allen's accepted answer above 7.0 and 7.1 are incompatible,

However Microsoft has released Preview versions of the drivers for 7.1. This worked for me, hope it helps anyone searching.

Drivers can be found here under downloads

Comments

1

I had this issue yesterday. The key to the error is the last bit.

The specified procedure could not be found.

In my case I went through a painful amount of debugging. The first thing that I noticed was that when I ran a hello world php file, I didn't get this error. That indicated to me it wasn't actually a problem loading the file, it was a problem calling a function in the file.

I went in and repeatedly put die() statements in and moved it until it hit the error. It took awhile but I eventually discovered I was calling sqlsrv_connect with options that were (apparently) now invalid.

So I can't say the exact cause of your issue without seeing the code that actually causes the error, but I hope this at least points you in the right direction.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.