Unexpected death (ldap_add -> core dump)
| From: | Michal Kolodziejczyk | Date: | Fri, 01 Oct 1999 23:25:25 +0000 |
| Subject: | Unexpected death (ldap_add -> core dump) | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5076@lists.php.net to get a copy of this message | ||
Hi,
I have a problem using ldap_add(). I suspect it is my openldap-1.2.6, or
glibc on my RH6.0, but I thing php should not dumping core. I use php4 cvs
from yesterday, but I have this problem for many days. I would appreciate
if someone give me a hint if this is related to my setup or there is a bug
in php4 (or both).
Test script:
<?
$LD['rootdn']='uid=root,o=myorg';
$LD['rootpasswd']='passwd';
if($ds=ldap_connect('localhost',389)):
$r=ldap_bind($ds,$LD["rootdn"], $LD["rootpasswd"]);
if($r):
$T['uid']='test';
$T['cn']='test';
$T['objectclass']='top';
$r=ldap_modify($ds, "uid=test,o=myorg", $T);
if($r):
echo "Modify OK";
else:
echo "Modify error";
endif;
else:
echo "Bind error";
endif;
endif;
?>
How to execute:
# /usr/bin/php < test.php3
Segmentation fault (core dumped)
# /bin/echo "\nbt" | gdb /usr/bin/pgp core
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 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"...
Core was generated by `/usr/bin/php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libdl.so.2...done.
Reading symbols from /lib/libnsl.so.1...done.
Reading symbols from /lib/libcrypt.so.1...done.
Reading symbols from /usr/lib/libgdbm.so.2...done.
Reading symbols from /usr/lib/libldap.so.1...done.
Reading symbols from /usr/lib/liblber.so.1...done.
Reading symbols from /usr/lib/mysql/libmysqlclient.so.7...done.
Reading symbols from /lib/libpam.so.0...done.
Reading symbols from /lib/libm.so.6...done.
Reading symbols from /lib/libresolv.so.2...done.
Reading symbols from /lib/libc.so.6...done.
Reading symbols from /lib/ld-linux.so.2...done.
Reading symbols from /lib/libnss_nisplus.so.2...done.
Reading symbols from /lib/libnss_files.so.2...done.
#0 _zval_ptr_dtor (zval_ptr=0x810d998,
__zend_filename=0x80c40c7 "zend_variables.c", __zend_lineno=174)
at zend_execute_API.c:213
213 (*zval_ptr)->refcount--;
(gdb) (gdb) #0 _zval_ptr_dtor (zval_ptr=0x810d998,
__zend_filename=0x80c40c7 "zend_variables.c", __zend_lineno=174)
at zend_execute_API.c:213
#1 0x806ba79 in _zval_ptr_dtor_wrapper (zval_ptr=0x810d998)
at zend_variables.c:174
#2 0x806ebaa in zend_hash_destroy (ht=0x8123df0) at zend_hash.c:740
#3 0x806b8b3 in _zval_dtor (zvalue=0x81273e0,
__zend_filename=0x80c3a5c "zend_execute_API.c", __zend_lineno=215)
at zend_variables.c:68
#4 0x80672b2 in _zval_ptr_dtor (zval_ptr=0x8102010,
__zend_filename=0x80c3a5c "zend_execute_API.c", __zend_lineno=539)
at zend_execute_API.c:215
#5 0x8067b19 in zend_ptr_stack_clear_multiple () at zend_execute_API.c:539
#6 0x8075cff in execute (op_array=0x8112bd0) at zend_execute.c:1552
#7 0x8075be6 in execute (op_array=0x8102230) at zend_execute.c:1524
#8 0x8058be6 in php_execute_script (primary_file=0xbffffd3c) at main.c:1171
#9 0x805f521 in main (argc=1, argv=0xbffffd94) at cgi_main.c:470
#10 0x400dccb3 in __libc_start_main (main=0x805f0b0 <main>, argc=1,
argv=0xbffffd94, init=0x8056ca4 <_init>, fini=0x80b61bc <_fini>,
rtld_fini=0x4000a350 <_dl_fini>, stack_end=0xbffffd8c)
at ../sysdeps/generic/libc-start.c:78
(gdb)
Michal
--
___
/ \ ___ Michal Kolodziejczyk Centrum Nowych Technologii
| |\ | | miko@cnt.pl Uphagena 2, 80-237 Gdansk
| | \| | tel/fax (58) 345 55 45
\ __/ ----------------- http://www.cnt.pl
----------------------