php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20967 LDAP_OPEN causes Segmentation Violation
Submitted: 2002-12-12 11:33 UTC Modified: 2002-12-12 21:54 UTC
From: cmcniel at ncs dot com Assigned:
Status: Not a bug Package: LDAP related
PHP Version: 4.2.3 OS: AIX 4.3.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cmcniel at ncs dot com
New email:
PHP Version: OS:

 

 [2002-12-12 11:33 UTC] cmcniel at ncs dot 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 ()






Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-12 11:48 UTC] 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 13:04 UTC] cmcniel at ncs dot 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 13:31 UTC] cmcniel at ncs dot com
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)
 [2002-12-12 13:56 UTC] cmcniel at ncs dot com
Thanks for your assistance so far.  Your direction has helped me to determine that this looks like an openldap issue.  Turns out ldapsearch also segfaults for some reason.  I will investigate this more as an openldap on AIX issue.

Thanks,
Craig
 [2002-12-12 21:54 UTC] iliaa@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Combination of the user comments and backtrace leads me to believe the problem is that of PHP, but rather a bug in ldap. Therefor I am making this report as bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC