Home  |  Linux  | Mysql  | PHP  | XML
Deprecated: Function ereg() is deprecated in /rscs/rs/websites/lmpx.com/code/nav/common.inc on line 99
Deprecated: Function ereg() is deprecated in /rscs/rs/websites/lmpx.com/code/nav/common.inc on line 82
From:Pai Date:Tue Oct 28 11:22:41 2008
Subject:sybase-ct with PHP sending blank user name and password
Using PHP - 5.2.6
Apache/2.2.8
Sybase CT 12.5.1
Solaris 10

Compiled PHP as below;
SYBASE=/apps/gentools/openclient
SYBASE_OCS=OCS-12_5
CFLAGS='-I/apps/gentools/openclient/OCS-12_5/include'
LDFLAGS='-R/apps/gentools/openclient/OCS-12_5/lib
-L/apps/gentools/openclient/OCS-12_5/lib'
LD_LIBRARY_PATH=/package/openldap/lib:/package/httpd-2.2.8/lib:$SYBASE/$SYBASE_OCS/lib

LIB=$SYBASE/$SYBASE_OCS/lib
PATH=/package/httpd-2.2.8/bin:package/openldap/bin:$SYBASE/$SYBASE_OCS/bin:/apps/gentools/gnu/bin:/apps/gentools/local/bin:/usr/local/bin:/apps/datatools/sbacktrack/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ccs/bin:/usr/ucb:/etc:/usr/etc


export SYBASE SYBASE_OCS CFFLAGS LDFLAGS LD_LIBRARY_PATH
PATH LIB


./configure --with-apxs2=/apps/sybase/apache_web/bin/apxs \
--prefix=/apps/sybase/apache_web \
--with-sybase-ct=$SYBASE/$SYBASE_OCS \
--with-libxml-dir=/package/libxml2-2.6.29 \
--with-ldap=/package/openldap \
--with-config-file-path=/apps/sybase/apache_web/conf \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-gd=shared

PHP pages are rendered correctly by appache. Just the Sybase
connection fails as PHP is sending blank user and password
to the database
<?php
$con = sybase_connect("SYD_DEV", "testphp", "testphp");
sybase_select_db("my_db");
$qry = sybase_query("select * from sysobjects", $con);

echo sybase_result($qry, 1, 1);

sybase_close($con);
?>

This fails with
Warning: sybase_connect() [function.sybase-connect]: Sybase:
Server message: Login failed. (severity 14, procedure N/A)
in /apps/sybase/apache_web/test.php on line 2
Warning: sybase_connect() [function.sybase-connect]: Sybase:
Client message: Login incorrect. (severity 78) in
/apps/sybase/apache_web/test.php on line 2
Warning: sybase_connect() [function.sybase-connect]: Sybase:
Unable to connect in /apps/sybase/apache_web/test.php on
line 2

If I trace the connection on the database, the errorlog
shows

00:00000:00090:2008/10/28 16:43:19.90 Logon Login failed.
User: , Client IP address: '65.111.25.30'.

The PHP is sending the login request to the correct database
' SYD_DEV', but the user and password are coming in as blank
resulting in the Login Failed error on the database.

I've attached my httpd.conf and php.ini. What could be
wrong?

I have tried single/double quotes in php, used the $con =
sybase_connect($server='SYD_DEV',$user='testphp',$pass='testphp');
still no luck.

I have also setup my crle path to point to
$SYBASE/$SYBBASE/lib during linking and compilation and that
didn't help either

Please assist
Navigate in group sybase.public.connectivity.open_client at sever forums.sybase.com
Previous Next


Your recent visits
Re: Ghostscript Pinter installation and the "not passed windows logo testing" message
Re: Cannot update null values into ase using AseCommand
ExecuteReader hangs and goes 100%CPU when the network cable is unplugged
PRINT statements in SQL and SQLDataReader
Re: How to use connection.GetSchema()?



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants