Hi,
I have an application and i use SQL server 2005.
The problem is I login and I use the application but after X minutes display error:
PHP Exception(0): Error en la conexion a SQL Server. in C:\wamp\ at line 164
The XXX are folder of the proyect.
I use sqlsrv to control the database.
The lines to connect are:
Please tell me what is the problem
Thank's
I have an application and i use SQL server 2005.
The problem is I login and I use the application but after X minutes display error:
PHP Exception(0): Error en la conexion a SQL Server. in C:\wamp\ at line 164
The XXX are folder of the proyect.
I use sqlsrv to control the database.
The lines to connect are:
PHP:
public function connect($auth) {
try {
$connectionInfo = array(
'Database' => $auth->database,
'UID' => $auth->user,
'PWD' => $auth->password
);
if ( ! $this->_con = sqlsrv_connect($auth->server, $connectionInfo) ) {
throw new Exception('Error en la conexion a SQL Server.');
}
return $this->_con;
} catch (Exception $e) {
echo 'PHP Exception('
. $e->getCode() . '): '
. $e->getMessage() . ' in '
. $e->getFile() . ' at line '
. $e->getLine();
exit();
}
}
Please tell me what is the problem
Thank's