MSSQL error (saying not enabled when it is) using WAMP / PHP 5.3.4
I am getting an error:
"Fatal error: Uncaught exception 'RuntimeException' with message 'The "mssql" extension is not loaded' in ..."
Though it is enabled. In php.ini (PHP version 5.3.4) it is uncommented out (no ;
) before extension=php_mssql.dll
and its showing up as checked off on the PHP extentions list in wamps system tray menu. What might be causing this?
Also semi related, I can't run php version 5.3.1. I downloaded and installed it but when i switch to it in wamp, the wamp system try stays yellow (instead of white indi开发者_如何学JAVAcating its ready to go). And no php loads anywhere / can't get to localhost or phpmyadmin at all. I tried to run 5.3.1 as a work around for this mssql error.
I am running WampServer Version 2.1 on a windows 7 64 bit box. This same exact setup works just fine on my windows XP (32-bit) box running 5.3.1.
Same issue. My apache log is showing
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.4/ext/php_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0.
I have the same issue with the ZIP module. The modules are legitimately not there.
I tried downgrading to PHP 5.3.1 from http://www.wampserver.com/en/addons_php.php, but then my Apache wouldn't start up at all; I'm guessing that was an x64/x86 issue.
Then tried copying the php_mssql.dll from 5.3.1 to my 5.3.4 directory, then restarting apache and it was just more fail with
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.4/ext/php_mssql.dll' - %1 is not a valid Win32 application.
Installing WampServer 2.1e (the active build) but 32-bit to see if there were any differences. There were. This build packages PHP 5.3.5, which still doesn't include php_mssql.dll. BUT I was then able to use PHP 5.3.1 I had downloaded (apparently it is capable with this WAMP Build, whether because it's 2.1e or because 32-bit, I don't know or care).
So, the point of the story is that if you're trying to use WAMP Server with PHP's MSSQL extension, you're going to want Wamp Server 2.1e (32-bit, specifically) and PHP 5.3.1.
Also note, I still can't get the ZIP extension working with this setup, but luckily for me it's not essential to my current project.
Hope that helps someone.
精彩评论