0

I am using WampServer Version 2.1, php5.3.5 , Apeache2.2.17 I could not use mssql_connect(), "mssql_connect() Fatal error: Call to undefined function mssql_connect()" I went through googling but still not found solution.

  • I have tried install SQLSRV30 and configure as tutor but still no luck,
  • I also tried copy this ntwdblib.dll (version 2000.80.194.0) to directories php5.3.5/ext and still no luck.

kindly help me.

3 Answers 3

2

According to here

These functions allow you to access MS SQL Server database. This extension is not available anymore on Windows with PHP 5.3 or later. SQLSRV, an alternative driver for MS SQL is available from Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx.

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

1 Comment

So no other solution beside SQLSRV because it need to modified code start with prefix sqlsrv_
1

First download SQLSRV20.EXE from here Put the file "php_sqlsrv_53_ts_vc9.dll" in your "wamp\php\ext" folder.

In php.ini add this line: extension=php_sqlsrv_53_ts_vc9.dll

Restart apache.

Then you should be able to connect with:

$connectionInfo = array( "Database" => "dbname", "UID" => "username", "PWD" => "password", "CharacterSet" => "UTF-8");
$con = sqlsrv_connect("ipaddress", $connectionInfo);
if( $con === false )
{
  die('Not working: ' . sqlsrv_errors());
}

3 Comments

I still got error message "Call to undefined function sqlsrv_connect()";
Hi sir... i also have the problem like you.... so could you tell me what is the old version of php and wamp?
ask i remember wamp that had logo with white color. (currently is red)
1

There is no x64 support for drivers microsoft's sqlsvr drivers. installing the 32 bit version of wamp may work for you.

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f8bb1ec9-eae1-4bd9-bf71-f2f732f00def/cant-connect-using-64-bit-versions-of-php-and-apache-extension-wont-even-load

Comments

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.