SQL server connection shows error when using mssql_connect() or sqlsrv_connect() .Call to undefined function mssql_connect() or Call to undefined function sqlsrv_connect() error is displaying. In my server IIS and wamp server is running. can any one please help...
1
-
<?php $server = "localhost"; $user = "Administrator"; $pass = ""; $connectionInfo = array( "Database"=>"test", "UID"=>"$user", "PWD"=>"$pass"); $conn = sqlsrv_connect( $server, $connectionInfo); if( $conn === false ) { die( print_r( sqlsrv_errors(), true)); } ?>user2986257– user29862572013-10-11 11:35:59 +00:00Commented Oct 11, 2013 at 11:35
Add a comment
|
2 Answers
"The MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini."
For more information : MSSQL Installing/Configuring
Comments
in the php.ini file remove the semicolon before the extention
it will probably be in C:\xampp\php\php.ini
enable your extention by removing the semicolon
change this with
;extension=php_mssql.dll
with
extension=php_mssql.dll
and restart your xampp
1 Comment
user2986257
Iam running PHP in IIS server. I have also tried with WAMP server, but it shows the same error