ID: 42642
User updated by: roberto dot valsania at mail dot wind dot it
Reported By: roberto dot valsania at mail dot wind dot it
-Status: Feedback
+Status: Open
Bug Type: Sybase (dblib) related
Operating System: FEDORA CORE 7
PHP Version: 5CVS-2007-09-12 (snap)
New Comment:
As i wrote i have the same sybase libs ( with ldap resolution) but the
old PHP 5.1.6 ( on FEDORA CORE 5) and it works.
I could try to compile this PHP with the FEDORA CORE 5 ( and the old
openldap libs ) and see what happen
Previous Comments:
[2007-09-12 11:05:23] [EMAIL PROTECTED]
Did you have same sybase libs in the other system too?
It seems to me that there's simply a conflict between openldap and
sybase's own ldap implementation and there's not much we can do about
that..
[2007-09-12 09:44:39] roberto dot valsania at mail dot wind dot it
Note that to have ldap support sybase client shuld be 12.5.1 or 15.
I made test with Sybase OpenClient 15
The same configuration ( enable ldap and sybase ) with php 5.1.6 and
fedora core 5 works
[2007-09-12 09:31:47] roberto dot valsania at mail dot wind dot it
Description:
PHP sybase_conect Crash when compiled with with-sybase and with-ldap
and sybase name resolution is done via LDAP
If PHP is compiled without ldap extension all works.
If Sybase resolution is done via interface file and not via LDAP all
works
To reproduce :
1) Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap
Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com
Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
instead of a stack trace
2) Run the following simple php script
Reproduce code:
---
To reproduce :
1) Compile php with :
./configure --enable-debug
--with-sybase=/sbrdbms/sybase/OpenClient15/OCS-15_0/ --with-ldap
Enable ldap sybase resolution by uncomment the following line in
$SYBASE/$SYBASE_OCS/config/libctl.cfg
ldap=libdldap.so ldap://ldaphost/dc=sybase,dc=com
Please note that in this example the ldap server is only the default
example. In this situation the sybase_connect should return error
(because it don't find the ldap server correct configuration) instead of
a stack trace
2) Run the following simple php script
Expected result:
an error or a sucessfull connection
Actual result:
--
A segmentation fault .
Here the backtrace :
[EMAIL PROTECTED] php5.2-200709120830]# gdb sapi/cli/php
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
warning: not using untrusted file
"/root/Development/php5.2-200709120830/.gdbinit"
(gdb) run ../../TEST_PHP/test_sybase.php
Starting program: /root/Development/php5.2-200709120830/sapi/cli/php
../../TEST_PHP/test_sybase.php
[Thread debugging using libthread_db enabled]
[New Thread -1208449344 (LWP 23841)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208449344 (LWP 23841)]
0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
(gdb) bt
#0 0x00472dc2 in ldap_send_server_request () from
/usr/lib/libldap-2.3.so.0
#1 0x00473092 in ldap_send_initial_request () from
/usr/lib/libldap-2.3.so.0
#2 0x00468248 in ldap_sasl_bind () from /usr/lib/libldap-2.3.so.0
#3 0x0066bc75 in ldap_simple_bind ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0/lib3p/libsybaseldap.so
#4 0x00267473 in gdd_bind ()
from
/sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdldap.so.15.0.3
#5 0x00153f5d in drv_bind ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#6 0x00153ab3 in dcl___bind ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#7 0x00153b7a in dcl__bind_sync ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#8 0x0015a11f in dcl_sess_bind ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#9 0x00145663 in db__initnet ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#10 0x0013077b in dbopen ()
from /sbrdbms/sybase/OpenClient15/OCS-15_0//lib/libsybdb.so
#11 0x082ac4e4 in php_sybase_do_connect (ht=3, return_value=0xa2c6ed8,
return_v