Windows 7 - extension mssql not loading

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Windows 7 - extension mssql not loading

Post by shiznatix »

Hi everyone! Long time no read-your-posts. Anyway, I am trying to get the mssql extension to work but am having loads of trouble. Here is the progression of my problem:

-Installed XAMPP, was going fine but couldn't get the extension load and their help was of no help
-Uninstalled XAMPP
-Installed Apache 2.2 - no problems
-Installed PHP using the installer, terrible idea
-Uninstalled PHP
-Downloaded and setup PHP from the ZIP file
-Got everything configured, good so far
-Was having problems with the mysql extensions but found that I needed to copy libmysql.dll to the apache bin/ directory, problem solved

Now I got to trying to fix the mssql problem. I am getting this oh so fun generic error in apache's error log:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP/ext\\php_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/PHP/ext\\php_pdo_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0
Now I have searched everywhere I possible could to find the answer to this problem. A lot of people were saying that you need ntwdblib.dll in your system32 folder. Ok, got that and put a copy there, nothing. I put a copy everywhere, PHP/ PHP/etc/ apache bin/ and system32/, nothing. I also heard something about installing "Microsoft Native SQL Server Client" so I found that and installed it, no dice.

So, does anyone have any ideas?
User avatar
liljester
Forum Contributor
Posts: 400
Joined: Tue May 20, 2003 4:49 pm

Re: Windows 7 - extension mssql not loading

Post by liljester »

normally in the past enabling the extension in the ini and copying ntwdblib.dll file to system32 was all that was needed... ive done it probably a hundred times, since php 4, windows server 2000, and mssql 2000. what version of php are you using? and i know its a stupid question, but have you verified that the php_mssql.dll file is in your ext directory? if it is, is you extensions dir set up correctly in your php.ini?

also worth noting, there is another mssql driver for php. microsft has produced a driver that you can download from msdn if you would like to give that a go.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Re: Windows 7 - extension mssql not loading

Post by shiznatix »

I tried everything I could (including what you suggested) but to no avail. What I ended up doing was having my co-worker who had a working copy running on his Windows 7 box give me a copy of his php directory and his ntwdblib.dll and then it worked. I have no idea why this became such a hassle, that should be so difficult to get running but alas, thats what it took.
shawnolds
Forum Newbie
Posts: 1
Joined: Thu Aug 25, 2011 10:30 am

Re: Windows 7 - extension mssql not loading

Post by shawnolds »

I was able to fix the problem with mssql not working by copying the "ntwdblib.dll" from the PHP directory into the Apache2\bin directory under program files since I could see that Apache was looking in this directory for my php.ini.
Post Reply