Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed PHP 5.2.11 and upon enabling the php_mssql.dll module (and the obligatory restart of the services) started receiving warnings about not being able to load the dynamic library. The operating environment is IIS ISAPI under Windows 2003 R2. Here is the list of things that were checked

  1. File Exists in \PHP\ext directory and has the same timestamp as the other distribution delivered libraries.
  2. Permissions are correct to the file. Other extensions are enabled and functioning with identical permissions.
  3. ntwdblib.dll has been copied from a SQL Server 2005 installation (per's requirements for the module)

Other modules before and after the php_mssql entry are working. I've also stripped down and remove all non-essential references with detectable improvements. I turned up logging and enabled all the error logs in the php.ini, nothing is generated by the logs.

Searching Google has turned up a slew of closed/unsolved bug reports on and some miscellaneous near-matches, none of which have really addressed the problem or lead to any inspirations.

share|improve this question

Because this recently bit me in the butt, you should check to make sure that the system path includes the directory that PHP is installed in.

Control Panel -> System -> Advanced -> Environment Variables -> Select Path under System Variables and then click the Edit button (be sure to click the lower Edit button, underneath System Variables).
Look through the little text box to make sure that your PHP directory is listed. If not, you can add it by appending a semicolon to the previous item and then typing the path (mine is C:\PHP)

share|improve this answer
+1 - You just put 45 minutes of fruitless troubleshooting to an end for me. Thank you! – Andrew H Dec 5 '11 at 22:23
up vote 1 down vote accepted

Found the problem: Apparently the msvscrt.dll wasn't in a location that made php happy. Made a copy in the C:\PHP Folder and now things work properly. The Path environmental variable was a good tip, but one that I'd already double checked.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.