1

My system is Win7-32bit and i'm using Apache 2.4.2 and with PHP 5.4.4 by XAMPP win32-1.8.0-VC9-installer.

Recently i'm building a website for my friend's online server, and he's using Microsoft SQL Server Express 2005. I've searching many solutions about the sqlsrv.dll extension on the internet, unfortunately is it doesn't slove my problem. I had extracted the php_sqlsrv.dll extension into php/ext/ folder, and added extension=php_sqlsrv.dll in php.ini config file, but i still got the WARNING error (PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_sqlsrv.dll' - The specified module could not be found.) during restarting the Apache service.

Because there's too many download links on the internet and i really don't understand about the non-thread-safe and thread-safe for extensions, so for pros please give the direct links to download those extensions file which is matched with my PHP and MS SQL Server versions.

Required Extensions: - sqlsrv.dll - pdo_sqlsrv.dll

Of course, if there are any i need to pay attention or modify, please give your advice.

Your help would be greatly appreciated!

1
  • Removed the apache tag since the driver does not care what web server is being used. Commented Aug 13, 2012 at 14:52

1 Answer 1

2

You'll want the "SQLSRV30.EXE" from this page. You'll need to check whether you're running thread-safe or not (use phpinfo();). The naming of the files that come out of that exe are important. You want the ones with "54" in the name. Then the "TS" or "NTS" refers to thread-safe or non-thread-safe. For more information refer to the manual.

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

6 Comments

Which i have to look at whether i'm using ts or nts in my phpinfo?
Search for the line "Thread safety". It will say enabled or disabled.
When in doubt, try each file till you find the one that works. You're not going to break anything.
Yeah, it's enabled, and one more question What code i have add in the php.ini to enable for the extensions?
I've installed SQL Server 2005 Express already in my computer but when im connecting the server with sqlsrv_connect() function in php, it returns errors said it needs the "Microsoft SQL Server 2012 Native Client" to work. As i know the "Microsoft SQL Server 2012 Native Client" is already installed together with the SQL Server 2005. So what's the problem? Do it need internet enable to work?
|

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.