#20967 [Opn]: LDAP_OPEN causes Segmentation Violation
| From: | cmcniel at ncs dot com | Date: | Thu, 12 Dec 2002 19:31:03 +0000 |
| Subject: | #20967 [Opn]: LDAP_OPEN causes Segmentation Violation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-27523@lists.php.net to get a copy of this message | ||
ID: 20967
User updated by: cmcniel@ncs.com
Reported By: cmcniel@ncs.com
Status: Open
Bug Type: LDAP related
Operating System: AIX 4.3.3
PHP Version: 4.2.3
New Comment:
When I recompile with only LDAP support the backtrace looks like the
following.
(gdb) bt
#0 0xd36ed048 in ber_strdup () at memory.c:541
#1 0xd37000e0 in ldap_pvt_get_fqdn (name=0x2ff202d0 "nichols") at
util-int.c:410
#2 0xd36ecddc in ldap_int_initialize (gopts=0xf0497958,
dbglvl=0x200407b8) at init.c:483
#3 0xd36f6b40 in ldap_create (ldp=0x2ff204d0) at open.c:94
#4 0xd36f6d6c in ldap_initialize (ldp=0x2ff2052c, url=0x200bbc28
"ldap://icexch3.ic.ncs.com:389") at open.c:192
#5 0x10170da8 in zif_ldap_connect ()
#6 0x1009018c in execute ()
#7 0x1007e9b8 in zend_execute_scripts ()
#8 0x10077728 in php_execute_script ()
#9 0x10179450 in apache_php_module_main ()
#10 0x10073e7c in send_php ()
#11 0x10073f18 in send_parsed_php ()
#12 0x10015ea4 in ap_invoke_handler ()
#13 0x1003e0f0 in process_request_internal ()
#14 0x1003e1b4 in ap_process_request ()
#15 0x10005d24 in child_main ()
#16 0x10005f50 in make_child ()
#17 0x1000618c in startup_children ()
#18 0x10006a88 in standalone_main ()
#19 0x100074ec in main ()
#20 0x10000204 in __start ()
(gdb)
Previous Comments:
------------------------------------------------------------------------
[2002-12-12 13:04:45] cmcniel@ncs.com
I reconfigured as follows.
./configure --with-oci8=/oracle/app/oracle/product/8.1.7
--with-sybase=/sybase/v11.5.1
--with-ldap=/oracle/app/oracle/product/8.1.7
--with-apache=/home/mcnicr/apache_1.3.27 --with-debug
and recieved the following error message.
checking for LDAP support... yes
configure: error: Cannot find ldap.h
also I recalled that I have read of the Oracle LDAP issue and I tried
compiling without Oracle or Sybase support and still failed on
ldap_open. I will try again with only
LDAP support after doing a make distclean and reconfigure. I'm using
openldap 2.0.27. Is there something else I need to do to use the
Oracle LDAP client to get rid of the above message ?
Thanks,
Craig
------------------------------------------------------------------------
[2002-12-12 11:48:03] sniper@php.net
Try compiling PHP with --with-ldap=/oracle/app/oracle/product/8.1.7
(oracle has it's own ldap stuff in there..)
------------------------------------------------------------------------
[2002-12-12 11:33:29] cmcniel@ncs.com
I have compiled 4.2.3 into my apache 1.3.27 executable with the
following options.
./configure --with-oci8=/oracle/app/oracle/product/8.1.7
--with-sybase=/sybase/v11.5.1 --with-ldap
--with-apache=/home/mcnicr/apache_1.3.27 --with-debug
./configure --activate-module=src/modules/php4/libphp4.a
--enable-module=rewrite --enable-module=headers --enable-module=so
--prefix=/www-home
Using the example code from the below mentioned web URL configured for
our local LDAP server (MS exchange 5.5).
http://www.php.net/manual/en/ref.ldap.php
I get a segmentation fault everytime the ldap_open call is executed.
I have enclosed the backtrace and any assistance would be greatly
appreciated.
Thanks
Craig
(gdb) bt
#0 0x10003d2c in sig_coredump ()
#1 <signal handler called>
#2 0xd36ed048 in ber_strdup () at memory.c:541
#3 0xd37000e0 in ldap_pvt_get_fqdn (name=0x60017e05 <Address
0x60017e05 out of bounds>) at util-int.c:410
#4 0xd36ecddc in ldap_int_initialize (gopts=0xf0497958,
dbglvl=0xffffffff) at init.c:483
#5 0xd36f6b40 in ldap_create (ldp=0x2ff20418) at open.c:94
#6 0xd36f6d6c in ldap_initialize (ldp=0x2ff20474, url=0x200bcc38
<Address 0x200bcc38 out of bounds>) at open.c:192
#7 0x10170da8 in floatcheck ()
#8 0x1009018c in execute ()
#9 0x1007e9b8 in zend_execute_scripts ()
#10 0x10077728 in php_execute_script ()
#11 0x101792c0 in read_common ()
#12 0x10073e7c in send_php ()
#13 0x10073f18 in send_parsed_php ()
#14 0x10015ea4 in ap_invoke_handler ()
#15 0x1003e0f0 in process_request_internal ()
#16 0x1003e1b4 in ap_process_request ()
#17 0x10005d24 in child_main ()
#18 0x10006074 in make_child ()
#19 0x1000653c in perform_idle_server_maintenance ()
#20 0x10006cd4 in standalone_main ()
#21 0x100074ec in main ()
#22 0x10000204 in __start ()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20967&edit=1