views:

388

answers:

1

I allways used php 5.2.3 version ,but now I updated php to 5.3.2 version.

I have problem with mssql,I can`t connect to mssql server.

I have downloaded a sql server driver for php 1.1

There are a lot of files, i used 'php_sqlsrv_53_ts_vc9' Put it on php/ext directory 'php_sqlsrv_53_ts_vc9'

I have added - extension=php_sqlsrv_53_ts_vc9.dll (in php.ini),but it`s give an error

Call to undefined function mssql_connect() in C:\webserver\www\MSSQl\db_mssql.class.php on line 26 

I have used
$serverName = "$sql_server"; $connectionInfo = array( "Database"=>$sql_db_name,"UID"=>$sql_user,"PWD"=>$sql_pass);

 $conn = sqlsrv_connect($serverName,$connectionInfo);
 if( $conn === false )
{
     echo "Could not connect.\n";
     die( sqlsrv_errors());
}

Than all work!!

+1  A: 

Open php.ini ,just add this line
extension=php_sqlsrv_53_ts_vc9.dll

you need to know what compiler do you use

phpinfo();

Compiler MSVC9 (Visual C++ 2008)
Than Add it.

Oyeme