Hi,
I cannot seem to get sybase_connect to work.
I have sybase-11.0.3 (ASE) installed on SuSE Linux 6.2 (i386) - Kernel
2.2.10
Apache and PHP4 is also installed. Here is an extract from what I get
from a
<?
phpinfo();
?>
//////////////////////////////////////////////////////////
Configure command: ... --with-sybase=/opt/sybase ...
sybase
Sybase support enabled
Allow Persistent Links Yes
Persistent Links 0/unlimited
Total links 0/unlimited
Application name PHP 4.0
Client API version Sybase DB-Library/10.0.4/ P/ Linux Intel/Linux 2.0.36
apache
User/Group sybase
Environment
SYBASE /opt/sybase
HTTP_ENV_VARS ["SYBASE"] /opt/sybase
//////////////////////////////////////////////////////////
This means that PHP is installed with Sybase and that the environment
variable
SYBASE is set to the correct directory /opt/sybase ?
My interfaces file:
//////////////////////////////////////////////////////////
SYBASE
query tcp ether max 5000
master tcp ether max 5000
//////////////////////////////////////////////////////////
With isql commands I seem to be able to connet to the database:
isql -U sa
password: mypwd1
use touchdb
go
select * from listtable
go
This works fine
//////////////////////////////////////////////////////////
I have an index.php in the htdocs directory. I use
lynx http://localhost/index.php
to look at it.
//////////////////////////////////////////////////////////
<?
print ("Environment: $SYBASE \n");
$host = "max";
$user = "sa";
$pwrd = "mypwd1";
$conn = sybase_connect($host, $user, $pwrd);
if (!$conn)
{
echo "cannot connect to $host";
exit;
}
?>
//////////////////////////////////////////////////////////
This ALWAYS gives the following output:
/opt/sybase
cannot connect to max
//////////////////////////////////////////////////////////
Permissions could be an issue. The following files in the /opt/sybase
directory have group and created by 'sybase' permissions
.bash_history
.sybinit
SYBASE.001 through .015
SYBASE.cfg
SYBASE.krg
install
interfaces
touchdbdata.dat
master.dat
sybprocs.dat
install/RUN_SYBASE
the whole 'init' dir
All the rest has root permissions
Can you please help? I am out of ideas.
Thanks
ABreed
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]