Hello,
I am attempting to use PHP to connect to out Microsoft SQL 7 server. I have built PHP with sybase-CT support and I have also installed freeetds.
Here is the code I am running:
<?
putenv("TDSDUMP=/tmp/tds.log");
putenv("SYBASE=/usr/local/include");
putenv("TDSVER=70");
$numero= mssql_connect("HOST_IN_INTERFACES_FILE" , "user" , "pass" );
echo ("ConnectID: $numero<br>\n");
?>
and I get the error:
Warning: Sybase: Unable to connect
/usr/local/etc/freetds/interfaces contains:
HOSTNAME
query tcp ether 10.0.0.2 1433
master tcp ether 10.0.0.2 1433
php.ini contains:
sybase.interface_file = "/usr/local/etc/freetds/interfaces"
I can not seem to figure out why this is not working. I have tried not having "ether" in the interfaces file. I have also tried running the page without setting the env variables at the top.
Any help would be greatly appreciated.
Thanks.
I am attempting to use PHP to connect to out Microsoft SQL 7 server. I have built PHP with sybase-CT support and I have also installed freeetds.
Here is the code I am running:
<?
putenv("TDSDUMP=/tmp/tds.log");
putenv("SYBASE=/usr/local/include");
putenv("TDSVER=70");
$numero= mssql_connect("HOST_IN_INTERFACES_FILE" , "user" , "pass" );
echo ("ConnectID: $numero<br>\n");
?>
and I get the error:
Warning: Sybase: Unable to connect
/usr/local/etc/freetds/interfaces contains:
HOSTNAME
query tcp ether 10.0.0.2 1433
master tcp ether 10.0.0.2 1433
php.ini contains:
sybase.interface_file = "/usr/local/etc/freetds/interfaces"
I can not seem to figure out why this is not working. I have tried not having "ether" in the interfaces file. I have also tried running the page without setting the env variables at the top.
Any help would be greatly appreciated.
Thanks.