Hi all,
I am trying to connect to a remote sybase database server (sitting on windows) from my freebsd apache webserver.
My Webserver has installed;
Apache2.0
PHP 4.3.8
Freetds with ODBC enables ( tsql works but isql doesnt )
unixODBC
syabse-ocsd
When i connect with tsql from command line, i am able to connect to my remote server. When i try to connect with isql i get this:
/usr/local/bin/isql -v my_remote_ip username password
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
Then i also wrote a php script to connec to the sybase server, my script looks like this:
<?php
echo "hi";
$lnk=sybase_connect('ip_address:5000','username','password') or die
("no luck chuck!");
echo "connected<br>";
sybase_close($lnk);
?>
BUt whenever i try to connect with it, i get this error:
hi
Fatal error: Call to undefined function: sybase_connect() in /htdocs/test/sybase_conn.php on line 3
Now, i got the sybase_ct.so file after i set php --with-sybase-ct=shared, usr/local .
Now in php.ini, i have the following lines:
extension = sybase_ct.so
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20020429/"
sybase.interface_file = "/usr/local/sybase/interfaces"
I read it up somewhere that i need to log in as webserver user: nobody and get connected with isql before it works. I tried that but i got the same error message as i get when i am connected as root:
/usr/local/bin/isql -v my_remote_ip username password
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
I am really short of ideas, i need help on a way to effect my php connection successfully.
Lealyz.