Connecting to Sybase ACE 11.9.2 db (InterShop4)
| From: | Graham Paul Wooden | Date: | Tue, 06 Jun 2000 12:36:05 +0000 |
| Subject: | Connecting to Sybase ACE 11.9.2 db (InterShop4) | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-223@lists.php.net to get a copy of this message | ||
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 "...
Why? These are the same parameters that are passed to ISQL when talking to
the DB that way, how come PHP is failing??
I have tried it with Sybase and Sybase-CT enabled inside PHP, but I get the
same results.
All I need to do is query and pull info. I have no need to update the db
from this angle.
Any suggestions? Has anyone done this before, maybe with InterShop's
installation of Sybase?
--
Graham Wooden.
graham@tridia.com .