2

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 indicating 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.

Czechnology
  • 14,832
  • 10
  • 62
  • 88
RAC
  • 516
  • 1
  • 9
  • 21
  • Please post output of phpinfo() - make sure the mssql extension shows as enabled there. – leek Mar 18 '11 at 18:32
  • phpinfo yields a lot of stuff so I don't want to post it all but no, mssql does not appear anywhere in phpinfo i just checked. The other extentions (mysqlnd, mysqli, mysql... etc) show up but not mssql. – RAC Mar 18 '11 at 18:49
  • Under phpinfo(), check the 'Loaded Configuration File' variable and make sure you are viewing and editing the correct php.ini – leek Mar 18 '11 at 19:21
  • C:\wamp\bin\apache\Apache2.2.17\bin\php.ini which is the correct version of php (5.3.4 currently) and the correct php.ini file. – RAC Mar 18 '11 at 20:42
  • See http://stackoverflow.com/q/9797951/87015 for more recent versions of PHP. – Salman A May 05 '15 at 07:27

1 Answers1

3

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.

Matthew
  • 31
  • 2
  • MSSQL extension is no longer bundled with PHP. It has to be downloaded from Microsoft website and also requires SQL client/ODBC driver. – Salman A May 05 '15 at 07:26