Hello,
I'm setting up PHP on a server that's been working with ASP and MSSQL (I usually work with *nix environments). I installed PHP using the installer from the website. I checked the 'MSSQL' extention in the installer to make sure it installed that too.
php_mssql.dll is in the ext folder
PHP.ini is in /Windows/
php_mssql.dll is added as an extention in the loaded PHP.ini file.
phpinfo(); confirms that php.ini is loading from the right place.
Here's the configure line from phpinfo if that helps:
cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build=d:\php-sdk\snap_5_2\vc6\x86\php_build" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--without-pi3web" "--enable-mongo=shared"
There's no sign of the word "mssql" in the phpinfo()
I found out that a
DLL 'ntwdblib.dll' was needed in the windows path. It wasn't there, or anywhere else on the system, so I put it in /Windows/, /Windows/system32/ , and the PHP path (/Program Files/PHP5 & /ext) for safe measure. Rebooted the server and web server, still no luck.
PHP is working fine apart from this.
The following code:
if (function_exists('mssql_connect')) {
echo "function exists";
} else {
echo "function doesn't exit.";
}outputs
function doesn't exit.and this code:
$link = mssql_connect($hostname, $db_username, $db_password);returns
PHP Fatal error: Call to undefined function mssql_connect() in C:\inetpub\wwwroot\db_open.php on line 7Any help would be greatly appreciated as I am well and truely stumped.