Can't connect to Sybase ASE server from PHP
| From: | Manuel Lemos | Date: | Sat, 20 Nov 1999 05:36:52 +0000 |
| Subject: | Can't connect to Sybase ASE server from PHP | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-12804@lists.php.net to get a copy of this message | ||
Hello,
I am trying to use PHP with the Adaptative Sybase Enterprise server that
came with Red Hat 5.2. I have installed following the quick start howto
document. I was able to put the main SYBASE and the SYB_BACKUP servers
to run during Linux boot and I can login the servers doing isql -Usa -P.
DBA user name is sa and password is empty.
My only problem is that I am not able to connect to the SYBASE server from
PHP. I just try to run a simple script like as follows using php
standalone executable, and it produces the error message below.
<?
sybase_connect("SYBASE","sa","");
?>
<br>
<b>Warning</b>: Sybase error: (severity 0) in <b>x.php</b> on line
<b>2</b><br>
<br>
<b>Warning</b>: No such host as SYBASE in <b>x.php</b> on line
<b>4</b><br>
My interfaces file in /opt/sybase/interfaces contains this
## SYBASE on cohones
## Services:
## query tcp (7100)
## master tcp (7100)
SYBASE
query tcp ether cohones 7100
master tcp ether cohones 7100
## SYB_BACKUP on cohones
## Services:
## query tcp (7110)
## master tcp (7110)
SYB_BACKUP
query tcp ether cohones 7110
master tcp ether cohones 7110
My php3.ini file sets
sybase.interface_file = "/opt/sybase/interfaces"
The showserver command returns this:
USER PID %CPU %MEM SIZE RSS TTY STAT START TIME COMMAND
sybase 1291 0.0 5.1 16264 6576 p2 S 04:04 0:00 /opt/sybase/bin/dataserver
-d/opt/sybase/master.dat -sSYBASE -e/opt/sybase/install/errorlog -i/opt/sybase
sybase 1293 0.0 3.1 6700 4084 p2 S 04:04 0:00 /opt/sybase/bin/backupserver -SSYB_BACKUP
-e/opt/sybase/install/backup.log -I/opt/sybase/interfaces -M/opt/sybase/bin/sybmultbuf -Lus_english
-Jiso_1 -c/opt/sybase/backup_tape.cfg
All seems to be correct but I have no idea what is still wrong. Anybody
can help?
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--