0

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)); } ?> Commented Oct 11, 2013 at 11:35

2 Answers 2

1

"The MSSQL extension is enabled by adding extension=php_mssql.dll to php.ini."

For more information : MSSQL Installing/Configuring

Sign up to request clarification or add additional context in comments.

Comments

0

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

Iam running PHP in IIS server. I have also tried with WAMP server, but it shows the same error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.