Marten Lehmann wrote: > Hello, > > my unixODBC-2.2.2 installation works fine. I tested the configuration > with a local and a remote ressource to a Sybase Adaptive Server Anywhere > database with isql (a testing tool of unixODBC). Thus the settings in > the odbc.ini and odbcinst.ini should be correct. But when I'm using > PHP-4.2.1 with unixODBC-support, I can connect to the local ressource > only, not to the remote-ressource, although it worked with isql. Do you > have any general ideas, why it doesn't work? > > Are there known issues about the unixODBC-implementation in php? PHP > always says "unable to connect to server: database not found". But as I > told before, the odbc.ini settings are correct. It seems that php tries > to connect to a local server although in odbc.ini CommLinks-settings are > defined. Does maybe php don't receive the odbc.ini data correct? I > thought that it might be a permission problem, but I ran apache 1.3.26 > (with php as module) with the same user to whom all the files and > databases belong and I got no positive result.
Hi, I know its a little late, but I have only just been pointed to your posting, I would guess the error you are getting "database not found" is coming from the sybase driver, not the driver manager. PHP doesn't get involved with the odbc.ini data, just the driver manager, but the sybase driver also needs to find its ini files, it doesn't get them from the driver manager ini file, but its own. Can you first try using apache in single user mode, ie httpd -X, as the same user that can connect (say using isql) to the sybase driver, if one can connect, but the other not, I would then try strace -o /tmp/stlog httpd -X then try and connect and have a look (send me a copy if you want) of the log, it should show what files and drivers its trying to load. --- Nick Gorham Easysoft. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php