Re: Connecting to Sybase ACE 11.9.2 db (InterShop4)

From: Date: Wed, 07 Jun 2000 09:10:05 +0000
Subject: Re: Connecting to Sybase ACE 11.9.2 db (InterShop4)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-244@lists.php.net to get a copy of this message
Graham Paul Wooden wrote: > OS = Linux, RedHat 6.1 with the stock 2.2.12 kernel. > PHP = 3.0.16, compiled as shared with MySQL and Sybase (sometimes with > Sybase-CT). > Apache = 1.3.9, compiled from the source. > Sybase = 11.9.2 Adaptive Server Enterprise, from InterShop4 ( e-commerce). > > Hello All, > > I am having one hell of a time connecting to a database on the same machine > as the webserver. > You would think it would be simple, but no. it is not. > > Right out of the bat, I am getting: > > Warning: 0 is not a Sybase link index in /home/httpd/html/sybase.php3 on > line 7 > > Here is what my code looks like, > <?php > $user="sa"; > $pass="*****"; > $host="ISSERVER"; > $db="tridia"; > $link_id = sybase_connect($host, $user, $pass); > $initialA = sybase_select_db($db, $link_id); > ?> > > So its complaining about the select_db line.... actually it has problems > from the very beginning. > $link_id is returning a 0, which means its not connecting.... I did an "echo > $link_id "... If it failing silently, or are you getting an error message? You may try tweaking your error reporting setting in order to see the error message. Also, when you start the Web server, try setting the Web server user's SYBASE environment variable to the directory where your interfaces file resides. Are you sure you've got Sybase support compiled into PHP? Does Sybase support show up on a page where you call phpinfo() ?? Eric

« previous php.db (#244) next »