Connect external MS SQL DB from Zend Framework on Linux Server
i have Linux Server where i want my Zend Framework, and want to connect my SqlServer Database which is on Other windows hosting Sever, i have installed database on that and having Database static link to connect with that.
but how can i connect with mssql database form linx sever ?
$server='some ip add'; $username='uname'; $password='passpass';
$database ='dbname' ;
$connection = mssql_connect($server, $username, $password)or die('Could Not Connect');
echo "test2";
if($connection != FALSE){
echo "Connected to the database server OK<br />";
}
else {
die("Couldn't connect" . mssql_get_last_message());
}
if(mssql_select_db($database, $connection)){
echo "Selected $database ok<br />";
}
else {
die('Failed to select DB');
}
this code returns nothing!
any buddy connected mssql sever from linux hosting ?
error_reporting(-1);). Chances are your host doesn't have the MSSQL extension loaded. Use PDO.