Installing PHP 5.2.14 in Windows 2008 IIS 7 with MS SQL Extensions

28 Oct

Every time I Install PHP on a Windows box I seem to encounter a new error. Anyway, I just got a new server up in the cloud and installed PHP on it yesterday, along with the MSSQL and MYSQL extensions. Everything seemed to be working well, until I tried the site using the MSSQL connections today, then I discovered that it wasn’t working after all.

I got a few errors when running “php.exe –v” from the command line. The first was a missing “ntwdblib.dll”, grab that here ntwdblib.dll (268.06 kb) and install it in the “\ext” folder.

Next was a missing “msvcr71.dll” file. Grab that here msvcr71.dll (340.00 kb) and place it in “c:\Windows\SysWOW64”.

Then, restart IIS and you’re away.

Thanks to harris for helping em out with this one. Cool name btw!

Update: I had to get curl working today (to get oscommerce to work) and I ran into some issues. When I added the curl extension, and then ran “php.exe -v”, I was getting the following error:

“The program can’t start because zlib.dll is missing from your computer. Try reinstalling the program to fix this problem.”

Anyway, there are loads of bug reports about this, but I found this article very useful. Basically, jsut search your machine for “zlib.dll” and then copy that into “c:\Windows\SysWOW64”. For your convenience, you can download a copy of it here. zlib.dll (72.00 kb)

Once this was added, oscommerce was very happy.