php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1980 httpd dumps core when using ldap_[read|search] with the fourth parameter
Submitted: 1999-08-06 05:17 UTC Modified: 1999-08-07 13:04 UTC
From: kenson at sentor dot se Assigned:
Status: Closed Package: Other
PHP Version: 4.0 Beta 1 OS: Linux 2.2.10/i686
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kenson at sentor dot se
New email:
PHP Version: OS:

 

 [1999-08-06 05:17 UTC] kenson at sentor dot se
This script crashes php:
<?
    $ds=ldap_connect("use.your.own.server.here");
    $r=ldap_bind($ds);     $sr=ldap_search($ds,"dc=sentor,dc=se","sn=Jansson",array("cn","mail"));
?>

our configure line:
./configure  --with-mysql --with-apache=../apache_1.3.6 --enable-track-vars --with-ldap=/usr/local

Backtrace of  SEGFAULT:
#0  zval_ptr_dtor (zval_ptr=0x816ec00) at zend_execute_API.c:212
#1  0x80afa9f in zend_hash_destroy (ht=0x816d5f8) at zend_hash.c:735
#2  0x80ac4a3 in zval_dtor (zvalue=0x816d7d8) at zend_variables.c:68
#3  0x80a77b7 in zval_ptr_dtor (zval_ptr=0x8165d1c) at zend_execute_API.c:214
#4  0x80a7eed in zend_ptr_stack_clear_multiple () at zend_execute_API.c:489
#5  0x80b634b in execute (op_array=0x81692e8) at zend_execute.c:1407
#6  0x807605c in php_execute_script (primary_file=0xbffff9ec) at main.c:1121
#7  0x80760f9 in apache_php_module_main (r=0x816353c, fd=19, display_source_mode=0)
    at main.c:1163
#8  0x807466c in send_php ()
#9  0x80746c0 in send_parsed_php ()
#10 0x80bd133 in ap_invoke_handler ()
#11 0x80d2bd9 in process_request_internal ()
#12 0x80d2c3c in ap_process_request ()
#13 0x80c95e9 in child_main ()
#14 0x80c97a8 in make_child ()
#15 0x80c9933 in startup_children ()
#16 0x80c9fb4 in standalone_main ()
#17 0x80ca8d3 in main ()

Other info:
When stepping through php3_ldap_do_search() it looks like
_php3_hash_[num_elements|index_find] both returns broken data.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-07 13:04 UTC] zeev at cvs dot php dot net
Fixed in the latest CVS
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 10 14:00:01 2026 UTC