Connection to SQL SERVER over network from PHP Apache Server
Posted: Tue Mar 28, 2006 3:25 am
Hi, Can anyone tell me how connect a MS QL SERVER over network from PHP Apache Server based on Red Hat Linux OS.
I created simple demo page to test a connection using System DSN MoAd.
"
$sql="Select * from Users"
$conn=odbc_connect('MoAd','sa','sa');
$rs=odbc_exec($conn,$sql);
$odbc_close($conn);
"
But when i run script from Apache Server i get "Fatal error: Call to undefined function: odbc_connect()"
I belive that Linux doesn't have ODBC for MS SQL SERVER which could identify the function call.
Is there solution for problem.
Regards,
Kamkrish
I created simple demo page to test a connection using System DSN MoAd.
"
$sql="Select * from Users"
$conn=odbc_connect('MoAd','sa','sa');
$rs=odbc_exec($conn,$sql);
$odbc_close($conn);
"
But when i run script from Apache Server i get "Fatal error: Call to undefined function: odbc_connect()"
I belive that Linux doesn't have ODBC for MS SQL SERVER which could identify the function call.
Is there solution for problem.
Regards,
Kamkrish