Cannot find php_sqlsrv extension - 5.3, threadsafe
Solution 1
Sadly, none of the answers addressed the issue or were avenues I had already explored.
I have decided to use the ODBC drivers with a SQL Server connection string, which seems to work fine, minus the fact I can't use MSSQL and SQLSRV native functions.
Solution 2
I have written a page that might help when installing the SQLSRV driver: http://robsphp.blogspot.co.uk/2012/09/how-to-install-microsofts-sql-server.html
Unfortunately the instructions got complicated when MSFT removed the download for the old XP/2003 driver (version 2.0), so read the whole page before starting.
Solution 3
Windows reports this when a shared lib dependency of what you're loading is missing. Use depends.exe to view the dependencies of php_sqlsrv_53_ts.dll and make sure it's either previously loaded or in the shared library search path.
http://www.dependencywalker.com/
Solution 4
See below url
php_sqlsrv.dll: gives error when checking PHP version but extension works
Read it:-
Since PHP 5.3, Microsoft has a new driver for windows :
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Maybe you can try this version, which seems quite recent (06/2011)
Hope that helps !
Comments
-
Michael B almost 2 years
I've followed the answer to this question to the letter:
Connection between MSSQL and PHP 5.3.5 on IIS is not working
I'm using XAMPP with threadsafe 5.3. I've copied the files to the extension directory (while leaving them in the /php folder) and I've added the extension lines:
extension=php_sqlsrv_53_ts.dll extension=php_pdo_sqlsrv_53_ts.dll
When I do this, Apache fails to start, giving me errors in
eventvwr
like:Application popup: Warning : PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_sqlsrv_53_ts.dll' - The specified module could not be found.
Except, obviously, that that file DOES exist in that spot, and php.ini is pointed at that extension directory.
What's the problem?
-
adam almost 12 yearsFYI:: I ran this against my ext/php_ibm_db2 <which works on our server> and it came up with about 50 dependencies. Almost none of those dependencies are in the /ext folder. This makes me wonder how accurate the tool is, or if i'm not understanding its use correctly.
-
Michael B over 11 yearsThis didn't seem to help (crashed actually when I ran it against the relevant files), but thanks for answering. (#mtgpro4L, BTW)
-
Michael B over 11 yearsIt's not helpful for this question, but thanks for adding it!
-
Erty Seidohl over 11 years@Kyle - just a heads up to make sure all of your stuff (esp. xampp) is 32-bit since that caused the error for us. Best of luck in finding the answer!
-
Michael B over 11 yearsThanks, I will look into your answer if I ever need it. I switched to a Linux/FreeTDS setup.