Page 1 of 1

Windows 7 - extension mssql not loading

Posted: Mon Jul 12, 2010 9:42 am
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?

Re: Windows 7 - extension mssql not loading

Posted: Fri Jul 16, 2010 12:48 pm
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.

Re: Windows 7 - extension mssql not loading

Posted: Tue Jul 20, 2010 8:21 am
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.

Re: Windows 7 - extension mssql not loading

Posted: Thu Aug 25, 2011 10:36 am
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.