Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 php.net'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 php.net and some miscellaneous near-matches, none of which have really addressed the problem or lead to any inspirations.

share|improve this question
add comment

2 Answers

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
add comment
up vote 0 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
add comment

Your Answer

 
discard

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.