ID: 38819 User updated by: madcoder at gmail dot com Reported By: madcoder at gmail dot com -Status: Feedback +Status: Open Bug Type: LDAP related Operating System: 2.6.15-gentoo linux amd64 PHP Version: 5.1.6 New Comment:
It's pretty much the same as before... (gdb) bt #0 0x00002aae16a8de44 in ldap_count_values (vals=0x559cadc0) at getvalues.c:153 #1 0x00005555555db423 in zif_ldap_get_entries (ht=1436331456, return_value=0x5555559ca5c0, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1435796224) at /var/tmp/portage/php-5.1.6-r4/work/php-5.1.6/ext/ldap/ldap.c:1068 #2 0x00005555556e4d20 in zend_do_fcall_common_helper_SPEC ( execute_data=0x7fff942851d0) at zend_vm_execute.h:200 #3 0x00005555556ed112 in ZEND_DO_FCALL_SPEC_CONST_HANDLER ( execute_data=0x7fff942851d0) at zend_vm_execute.h:1640 #4 0x00005555556e43f9 in execute (op_array=0x5555559c7ae0) at zend_vm_execute.h:92 #5 0x00005555556bf1d8 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /var/tmp/portage/php-5.1.6-r4/work/php-5.1.6/Zend/zend.c:1109 #6 0x0000555555670784 in php_execute_script (primary_file=0x7fff94287790) at /var/tmp/portage/php-5.1.6-r4/work/php-5.1.6/main/main.c:1737 #7 0x00005555557756f4 in main (argc=3, argv=0x7fff942879c8) at /var/tmp/portage/php-5.1.6-r4/work/php-5.1.6/sapi/cli/php_cli.c:1093 The ldap code to reproduce the problem is the same as at the beginning of this report... The difference between the code I posted originally and the code that gave me the above output (showing "Count: 1"), is this: echo "done searching\n"; echo "Count: " . ldap_count_entries($_SERVER['ldap'],$r) . " entries\n"; $info = ldap_get_entries($_SERVER['ldap'], $r); (that is, I added the Count line *after* the original post; everything else is the same) Previous Comments: ------------------------------------------------------------------------ [2006-09-25 21:56:59] [EMAIL PROTECTED] What is the backtrace and how to reproduce it? ------------------------------------------------------------------------ [2006-09-25 21:42:38] madcoder at gmail dot com I've recompiled PHP with: # emerge -pv php [ebuild R ] dev-lang/php-5.1.6-r4 USE="debug ldap -apache -apache2 -bcmath -berkdb -bzip2 -calendar -cdb -cgi -cjk -cli -concurrentmodphp -crypt -ctype -curl -curlwrappers -db2 -dbase -discard-path -doc -exif -flatfile -force-cgi-redirect -ftp -gd -gd-external -gdbm -gmp -hardenedphp -hash -hyperwave-api -iconv -imap -inifile -interbase -iodbc -ipv6 -java-external -kerberos -libedit -mcve -memlimit -mhash -ming -msql -mssql -mysql -mysqli -ncurses -nls -oci8 -odbc -pcntl -pcre -pdo -pdo-external -pic -posix -postgres -qdbm -readline -recode -reflection -sapdb -sasl -session -sharedext -sharedmem -simplexml -snmp -soap -sockets -spell -spl -sqlite -ssl -sysvipc -threads -tidy -tokenizer -truetype -unicode -vm-goto -vm-switch -wddx -xml -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip -zlib" (enabling only ldap and debug) It results in the following configure line, as reported by phpinfo(): Configure Command => './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--enable-cli' '--disable-cgi' '--with-config-file-path=/etc/php/-php5' '--with-config-file-scan-dir=/etc/php/-php5/ext-active' '--without-pear' '--disable-bcmath' '--without-bz2' '--disable-calendar' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-dom' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--disable-ftp' '--without-gettext' '--without-gmp' '--disable-hash' '--without-hwapi' '--without-iconv' '--without-informix' '--disable-ipv6' '--without-kerberos' '--disable-libxml' '--disable-mbstring' '--without-mcrypt' '--disable-memory-limit' '--without-mhash' '--without-ming' '--without-msql' '--without-mssql' '--without-ncurses' '--without-openssl' '--without-openssl-dir' '--disable-pcntl' '--without-pcre-regex' '--disable-pdo' '--without-pgsql' '--disable-posix' '--without-pspell' '--without-recode' '--disable-reflection' '--disable-simplexml' '--disable-shmop' '--without-snmp' '--disable-soap' '--disable-sockets' '--disable-spl' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--without-tidy' '--disable-tokenizer' '--disable-wddx' '--disable-xml' '--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--without-xsl' '--without-zlib' '--enable-debug' '--without-cdb' '--without-db4' '--without-flatfile' '--without-gdbm' '--without-inifile' '--without-qdbm' '--without-freetype-dir' '--without-t1lib' '--disable-gd-jis-conv' '--disable-gd-native-ttf' '--without-jpeg-dir' '--without-png-dir' '--without-xpm-dir' '--without-gd' '--with-ldap' '--without-ldap-sasl' '--without-mysqli' '--without-readline' '--without-libedit' '--disable-session' '--without-sqlite' And it still segfaults: # php -e test.php done searching Count: 1 entries Segmentation fault ------------------------------------------------------------------------ [2006-09-25 07:13:50] [EMAIL PROTECTED] Yes, please recompile it with just ./configure --enable-debug --with-ldap --disable-all and try again. ------------------------------------------------------------------------ [2006-09-24 03:59:33] madcoder at gmail dot com My configure line (generated by gentoo's portage): ----- './configure' '--prefix=/usr/lib64/php5' '--host=x86_64-pc-linux-gnu' '--mandir=/usr/lib64/php5/man' '--infodir=/usr/lib64/php5/info' '--sysconfdir=/etc' '--cache-file=./config.cache' '--with-libdir=lib64' '--enable-cli' '--disable-cgi' '--with-apxs2=/usr/sbin/apxs2' '--enable-maintainer-zts' '--with-config-file-path=/etc/php/-php5' '--with-config-file-scan-dir=/etc/php/-php5/ext-active' '--without-pear' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--disable-ctype' '--without-curl' '--without-curlwrappers' '--disable-dbase' '--disable-exif' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--enable-ftp' '--with-gettext' '--without-gmp' '--disable-hash' '--without-hwapi' '--without-iconv' '--without-informix' '--disable-ipv6' '--without-kerberos' '--disable-mbstring' '--with-mcrypt' '--enable-memory-limit' '--without-mhash' '--without-ming' '--without-msql' '--with-mssql' '--with-ncurses' '--with-openssl' '--with-openssl-dir=/usr' '--disable-pcntl' '--disable-pdo' '--with-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--disable-shmop' '--with-snmp' '--enable-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--disable-sysvmsg' '--disable-sysvsem' '--disable-sysvshm' '--with-tidy' '--disable-wddx' '--disable-xmlreader' '--disable-xmlwriter' '--without-xmlrpc' '--with-xsl' '--with-zlib' '--enable-debug' '--enable-dba' '--without-cdb' '--with-db4' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-qdbm' '--without-freetype-dir' '--without-t1lib' '--disable-gd-jis-conv' '--disable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gd' '--with-ldap' '--without-ldap-sasl' '--with-mysql=/usr/lib/mysql' '--with-mysql-sock=/var/run/mysqld/mysqld.sock' '--without-mysqli' '--with-readline' '--without-libedit' '--without-mm' '--with-sqlite=/usr' '--disable-sqlite-utf8' ----- The version of MySQL is: Client API version 4.1.21 My Gentoo portage USE flags for dev-lang/php: [ebuild R ] dev-lang/php-5.1.6-r4 USE="apache2 berkdb bzip2 cli crypt debug fastbuild ftp gd gdbm ldap memlimit mssql mysql ncurses nls pcre pdo-external postgres readline reflection session simplexml snmp soap sockets spell spl sqlite ssl threads tidy tokenizer xml xpm xsl zlib -apache -bcmath -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -discard-path -doc -exif -flatfile -force-cgi-redirect -gd-external -gmp -hardenedphp -hash -hyperwave-api -iconv -imap -inifile -interbase -iodbc -ipv6 -java-external -kerberos -libedit -mcve -mhash -ming -msql -mysqli -oci8 -odbc -pcntl -pdo -pic -posix -qdbm -recode -sapdb -sasl -sharedext -sharedmem -sysvipc -truetype -unicode -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -yaz -zip" I have also compiled with pdo-external, including dblib, mysql, pgsql, and sqlite support. The pdo-mysql version is the same library (4.1.21). I can recompile without mysql support to see if that might be part of it? Or PDO? ------------------------------------------------------------------------ [2006-09-23 11:32:03] [EMAIL PROTECTED] What was your configure line and did you enable any of mysql related extensions? If yes, then what is the version of MySQL? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/38819 -- Edit this bug report at http://bugs.php.net/?id=38819&edit=1