Partner and Community Forums
Impossible to activate extension=php_mssql.dll
Last post Sep 06, 2017 09:01 AM by catiagobus
Sep 25, 2009 01:39 PM|Bartsimpson|LINK
I'm in big trouble and hopping someone will help me. I've installed php5 on Windows Server 2008, using fastCGI mode, not ISAPI.
Everything runs correctly and I'm able to display a correct phpInfo in a php page. BUT, when I try to activate php_mssql.dll removing the ";" before in php.ini file, evrything goes wrong. Evry php page, even the phpinfo one, turns into
The extension_dir = "c:\php\ext" is correct, and the php_mssql.dll file is in.
When I try to activate another extension (for exemple mysql, it works !).
HELP HELP HELP !!! :)
Sep 25, 2009 03:07 PM|cstobbe|LINK
What version of PHP? If 5.3.x, it seems that php_mssql.dll is no longer supported. I believe that the recommended replacement is Microsoft's SQLSRV which you have to download separately. See http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70.
Sep 25, 2009 03:52 PM|Bartsimpson|LINK
Well according to phpinfo, I'm using
Sep 25, 2009 04:13 PM|cstobbe|LINK
I see that like PHP 5.3.0, PHP 5.2.11 also does not include php_mssql.dll. I haven't tried 5.2.11, but I don't believe that it is correct to use your own php_mssql.dll from a previous PHP release. When I upgraded from 5.2.10 to 5.3.0, I had to use the SQLSRV
driver instead. Unfortunately, the SQLSRV API is slightly different so I had to change some code, but it seems to work fine.
Sep 25, 2009 04:59 PM|Bartsimpson|LINK
Well, it's a fresh install... But I will change for SQLSRV driver. Could you give me a reliable link to see how to do that ?
Thanks in advance
Sep 25, 2009 07:14 PM|cstobbe|LINK
You can download one of these versions of SQLSRV driver:
Version 1.1 CTP
I'm not sure if 1.0 supports PHP 5.2.11. I know that 1.0 does not support PHP 5.3; I had to use 1.1 even though it is not yet in final release.
SQL Server Driver for PHP
MSSQL + 5.3.X
Sep 26, 2009 04:08 AM|pierrejoye|LINK
Be sure to have the php directory in your PATH. The MsSql extensions require a DLL, ntwdblib.dll.
Sep 26, 2009 09:46 AM|Bartsimpson|LINK
Oops... doesn't work.
Sep 26, 2009 09:55 AM|Bartsimpson|LINK
Well, It finally works, I've installed SQLSRV driver... and changed my code.
Thank you very much for your help.
Nov 14, 2009 04:34 AM|mnq|LINK
I got the same problem (PHP 5.2.11), php-errors shows:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_mssql.dll' - The specified module could not be found.
And phpinfo doesn't show anything about MSSQL. I installed php_sqlsrv.dll extension and it works fine.
Can anyone tell me if I can use php_mssql.dll on PHP 5.2.11? And if yes - how?
Nov 14, 2009 01:46 PM|don.raman|LINK
Can I know why do you need php_mssql.dll? php_sqlsrv.dll is the one which is fully supported by Microsoft SQL Server team and I would say if you are doing any new development you should use this DLL.
php_mssql has dependency on some very old DLL which is no longer shipped as part of SQL Server nor supported by Microsoft.
Please run php-cgi.exe -v from command line and it will tell you what DLL is missing? You can also use
depends.exe to figure out the same. However I will say if it is possible to use php_sqlsrv.dll you should try using that.
Sep 06, 2017 09:01 AM|catiagobus|LINK
I have the same problem and i use PHP 5.2.17 and Apache2.2 and i have to mantanence a system thats use php_mssql.dll extension and i cannot use php_sqlsrv.dll because all the other developers use php_mssql.dll, so i cannot just change the code...
I try copy lib from PHP to Apache but didnt work...
Do you have any suggestions?