Re: PHP, ODBC, & ASA 6.0.3

From: Date: Wed, 13 Sep 2000 08:36:01 +0000
Subject: Re: PHP, ODBC, & ASA 6.0.3
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2859@lists.php.net to get a copy of this message
Sean M wrote: > > Hi. Using ODBC under linux to connect to a database on a Windows NT machine > works fine with dbisql, but when I try and use it with PHP, it doesn't work. > The PHP error is given: > > Warning: SQL error: [Sybase][ODBC Driver][Adaptive Server Anywhere]Unable to > connect to database server: Server not found and unable to autostart, SQL > state 08001 in SQLConnect > > when I try and use the odbc_connect() function. > > The ODBCINI environment variable is set, and points to .odbc.ini. The > contents of this file are: > --- > [dbtest] > ENG=dbtest > CommLinks=tcpip(Host=x.x.x.x) > UID=dba > PWD=test > --- > The IP, name, and password are all correct. As far as I can tell, > everything is correct, especially since dbisql works fine. PHP compiled > fine against libdblib6.so and libdbodbc6.so. Both machines are using ASA > 6.0.3. > > Does anyone know why this isn't working for PHP? If isql can use the > .odbc.ini file and connect properly, why can't PHP? > Please check that - the ODBCINI environment variable is set for the user running the webserver (you can write a php script containg just <? phpinfo() ?> to see what is set in your webserver env) - that the webserver user can actually read the file ODBCINI points to -Andreas -- Andreas Karajannis GMD National Research Center for Information Technology Schloss Birlinghoven, D-53754 Sankt Augustin Phone +49 2241 142948

« previous php.db (#2859) next »