maybe somebody is able to help with the following problem:

I have to install PHP 5.2 on Windows 2008 IIS with MSSQL Support but I'm unable to get MSSQL to work.

Current situation

  • Windows 2008 Server 64bit
  • IIS7
  • PHP 5.2.17 installed with PHP Manager
  • PHP works fine
  • php_mssql doesn't (logs errors)

When I add the php_mssql.dll it won't work and it logs this error: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\PHP\PHP5.2\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0.

I know there is a problem with the ntwdblib.dll which is loaded internally from php_mssql.dll, but the file is in the PHP directory and I copied it everywhere: system32, php\ext etc but nothing works. That helps in previous installations every time in this case, but this is my first Windows 2008 64bit Installation, maybe there is a 64bit problem?

And I know I should use the Microsoft Drivers for PHP for SQL Server but that would lead me to other function calls (sqlsrv_connect instead of mssql_connect) and I have to run an old application which contains mssql_ function calls on this server.

  • Is the web worker running in 32-bit mode? Oct 11 '11 at 8:36
  • How do I know that? Where to look?
    – Marc
    Oct 14 '11 at 1:28

I Argue with Whoru,

Our company Web system of 6 servers all run php with the MSSQL driver on IIS and its far more stable then LAMP in terms of hacking the server NTLM on a Domain Server is almost unbreakable unlike SSH witch will let you retry to no end,

But you must use sqlsrv_connect as the php mssql_connect driver is dead wont work on SQL 2k5 or 2k8

We had to make the change on all of our servers sorry i could not give you better news

  • So the application has to be updated to sqlsrv_ functions, there is no other way. Ok, thanks!
    – Marc
    Oct 14 '11 at 1:30

First of all why in the world you want to use PHP on Windows and that too using IIS and MSSQL?

Better solution for any of your problem would be L inux A pache M ySQL P HP

  • It's not me who wants that it's the customer. The question is about getting PHP/MSSQL/Win2008 to work.
    – Marc
    Oct 11 '11 at 8:08
  • But btw you are right, I would prefer a XAMPP installation but that isn't possible in the specific situation.
    – Marc
    Oct 11 '11 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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