Windows – PHP 5.2.11: Unable to load dynamic library complaints

iisphp.iniphp5sql serverwindows

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.

Best Answer

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)