ID: 23196
Comment by: msopacua at idg dot nl
Reported By: dave at socrates dot thinkhost dot com
Status: Open
Bug Type: CGI related
Operating System: FreeBSD 4.8-STABLE
PHP Version: 4.3.2RC2
New Comment:
Can't reproduce this with 4.8-STABLE and how did you ever get an argc
of 30?
Can you type the following in gdb:
frame 2
followed by:
info local
Also:
/path/to/cgibinary/php -f /path/to/phpinfo.php
should give you an argc of three, where argv[2] should be the filename
and argv[3] should be NULL (check by print argv[2] and print argv[3]
respectively).
Previous Comments:
------------------------------------------------------------------------
[2003-05-06 11:27:07] dave at socrates dot thinkhost dot com
I have tried the new PHP-4.3.2RC2 source, and the problem still
persists, here is the back trace from the PHP CGI binary built from the
PHP-4.3.2RC2 source tree:
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/local/lib/libmcal.so...done.
Reading symbols from /usr/local/lib/libc-client4.so.8...done.
Reading symbols from /usr/local/lib/libexpat.so.4...done.
Reading symbols from /usr/local/lib/libpq.so.2...done.
Reading symbols from /usr/local/lib/libpdf.so.4...done.
Reading symbols from /usr/lib/libz.so.2...done.
Reading symbols from /usr/local/lib/libtiff.so.4...done.
Reading symbols from /usr/local/lib/libpng.so.5...done.
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.10...done.
Reading symbols from /usr/local/lib/libming.so.3...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/local/lib/libmhash.so.2...done.
Reading symbols from /usr/local/lib/libmcrypt.so.8...done.
Reading symbols from /usr/local/lib/libltdl.so.1...done.
Reading symbols from /usr/local/lib/libldap.so.2...done.
Reading symbols from /usr/local/lib/liblber.so.2...done.
Reading symbols from /usr/lib/libpam.so.1...done.
Reading symbols from /usr/local/lib/libintl.so.4...done.
Reading symbols from /usr/local/lib/libgd.so.2...done.
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Reading symbols from /usr/local/lib/libcurl.so.2...done.
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/lib/libssl.so.3...done.
Reading symbols from /usr/lib/libcrypto.so.3...done.
Reading symbols from /usr/local/lib/libssl.so.3...done.
Reading symbols from /usr/local/lib/libcrypto.so.3...done.
Reading symbols from /usr/local/lib/libssl.so.4...done.
Reading symbols from /usr/local/lib/libcrypto.so.4...done.
Reading symbols from /usr/local/Zend/lib/ZendOptimizer.so...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 0x81901de in _estrdup (s=0x0) at
/usr/local/src/php-4.3.2RC2/Zend/zend_alloc.c:363
363 length = strlen(s)+1;
(gdb) bt
#0 0x81901de in _estrdup (s=0x0) at
/usr/local/src/php-4.3.2RC2/Zend/zend_alloc.c:363
#1 0x81b24e5 in init_request_info () at
/usr/local/src/php-4.3.2RC2/sapi/cgi/cgi_main.c:709
#2 0x81b2b57 in main (argc=30, argv=0xbfbff5ec) at
/usr/local/src/php-4.3.2RC2/sapi/cgi/cgi_main.c:1238
#3 0x808cb56 in _start ()
(gdb) quit
------------------------------------------------------------------------
[2003-04-30 07:19:25] dave at socrates dot thinkhost dot com
Relevant lines from httpd.conf:
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
mod_gzip_item_include file \.php$
mod_gzip_item_include mime ^application/x-httpd-php
------------------------------------------------------------------------
[2003-04-30 07:17:12] dave at socrates dot thinkhost dot com
This is the CGI, so there is no httpd.conf config that affects it.
The crash below was produced from a very simple script:
<?php
phpinfo();
?>
------------------------------------------------------------------------
[2003-04-30 06:21:27] sniper@php.net
how did you configure it in httpd.conf?
what query crashes it?
------------------------------------------------------------------------
[2003-04-29 20:13:01] dave at socrates dot thinkhost dot com
I am sorry the rest of the backtrace was missing, here is everything:
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libcrypt.so.2...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0 0x28202975 in strlen () from /usr/lib/libc.so.4
(gdb) bt
#0 0x28202975 in strlen () from /usr/lib/libc.so.4
#1 0xbfbff528 in ?? ()
#2 0x8162ddb in init_request_info () at
/usr/local/src/php-4.3.2RC/sapi/cgi/cgi_main.c:709
#3 0x81636bb in main (argc=31, argv=0xbfbff4a8) at
/usr/local/src/php-4.3.2RC/sapi/cgi/cgi_main.c:1238
#4 0x806006a in _start ()
------------------------------------------------------------------------
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/23196--
Edit this bug report at http://bugs.php.net/?id=23196&edit=1