My name is Cristian Rosa, i\'m using unixODBC + freeTDS + PHP4 + apache 1.3.23.
I compiled unixODBC (in its default prefix /usr/local) with freeTDS support successfully, then
i compiled PHP4 with the following parameters
./configure --with-apache=../apache_1.3.23 --with-unixODBC=/usr/local --enable-track-vars
and i compiled apache with the following configure parameters
./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
i built everything successfully.
i created the following driver for unixODBC driver (in /usr/local/etc/odbcinst.ini)
[TDS]
Description = v0.52 with protocol v7.0
Driver = /usr/local/freetds/lib/libtdsodbc.so
FileUsage = 1
and later the following datasource (in both /usr/local/etc/odbc.ini and /root/.odbc.ini)
[SERVER]
Driver = TDS
Description = OSDETDU
Trace = No
servername = 192.9.200.55
Database = OSDETDU
UID = sa
When i use isql ( commandline: isql SERVER sa sa)to connect everything works fine and fast, but when i want to connect
with the following php:
<head>
<title>Prueba php</title>
</head>
<body>
<?
$dbconn = odbc_connect(\"SERVER\",\"sa\",\"sa\");
if($dbconn == 0)
echo \"No conecta\";
else
echo \"Funciona!!!!\";
?>
</body>
i get the following error message
Warning: SQL error: [unixODBC]Could not find Servername parameter, SQL state 08001 in SQLConnect in /www/htdocs/publica/index.php on line 8
No conecta
i tried different solutions but nothing seems to work. Any suggestion? is this a bug?