#36084 [Fbk->Opn]: apache2 segfaults on phpinfo()

From: Date: Fri, 20 Jan 2006 07:19:44 +0000
Subject: #36084 [Fbk->Opn]: apache2 segfaults on phpinfo()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92255@lists.php.net to get a copy of this message
ID: 36084 User updated by: clive at darkarts dot co dot za Reported By: clive at darkarts dot co dot za -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: FreeBSD PHP Version: 5.1.2 New Comment: commandline as follows was used: % rm config.cache ; ./configure --disable-all --disable-cgi --enable-maintainer-zts && make clean && make && sapi/cli/php -r 'phpinfo();' this runs fine, without segfaulting, on both 5.1.2 as well as the snapshot 5.1-200601191130. 'sapi/cli/php -v' on 5.1.2 gives: PHP 5.1.2 (cli) (built: Jan 20 2006 09:28:25) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies 'sapi/cli/php -v' on 5.1.200601191130 gives: PHP 5.1.3-dev (cli) (built: Jan 20 2006 09:19:48) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies Previous Comments: ------------------------------------------------------------------------ [2006-01-19 16:16:41] sniper@php.net Try adding --enable-maintainer-zts to that previous configure line. Does it still crash? What does this output: # sapi/cli/php -v And 'make clean' is _mandatory_ always. (remember to 'rm config.cache' before running the configure line too!) ------------------------------------------------------------------------ [2006-01-19 16:11:40] tony2001@php.net >undefined reference to `spl_ce_Countable' Yeah, make clean is required before make. ------------------------------------------------------------------------ [2006-01-19 16:07:54] clive at darkarts dot co dot za Ah, I did not know about ZTS, thank you. as per your instructions:: on php-5.1.2: ext/standard/.libs/array.o(.text+0x5ba): In function `zif_count': /usr/ports/lang/php5/work/php-5.1.2/ext/standard/array.c:326: undefined reference to `spl_ce_Countable' on php-5.1-200601191130: runs perfectly, no segfault (I'm sorry if my next answers come much later, I have to leave now and wont be near a PC again for about 16 hours. I will answer any questions then as fully as possible. Thanks ) ------------------------------------------------------------------------ [2006-01-19 15:56:07] sniper@php.net It doesn't matter if you run CLI if it's still compiled with ZTS enabled. Which it is if you use the one you build when building the Apache module. Does this work without crashing: # rm config.cache ; ./configure --disable-all --disable-cgi && make && sapi/cli/php -r 'phpinfo();' ------------------------------------------------------------------------ [2006-01-19 15:33:34] clive at darkarts dot co dot za Yes, and I have said many times already that I am using CLI version too *WITHOUT APACHE*, but, I will give you the info in full again: ldd ./php ./php: libcrypt.so.3 => /lib/libcrypt.so.3 (0x2823a000) libm.so.4 => /lib/libm.so.4 (0x28252000) libxml2.so.5 => /usr/local/lib/libxml2.so.5 (0x28268000) libz.so.3 => /lib/libz.so.3 (0x28385000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28395000) libc.so.6 => /lib/libc.so.6 (0x28484000) ./php phpinfo.php <<*snip*>> report_memleaks => On => On report_zend_debug => Off => Off safe_mode => Off => Off safe_mode_exec_dir => /usr/local/php/bin => /usr/local/php/bin safe_mode_gid => Off => Off safe_mode_include_dir => no value => no value sendmail_from => no value => no value sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i serialize_precision => 100 => 100 short_open_tag => On => On SMTP => localhost => localhost smtp_port => 25 => 25 sql.safe_modephp in free(): error: junk pointer, too high to make sense zsh: abort (core dumped) ./php index.php gdb ./php php.core (gdb) bt #0 0x284c64b3 in kill () from /lib/libc.so.6 #1 0x284bb4f0 in raise () from /lib/libc.so.6 #2 0x28535c5c in abort () from /lib/libc.so.6 #3 0x284dccb3 in _UTF8_init () from /lib/libc.so.6 #4 0xbfbfe91e in ?? () #5 0x2853c653 in sys_nsig () from /lib/libc.so.6 #6 0x2853c553 in sys_nsig () from /lib/libc.so.6 #7 0x2853c670 in sys_nsig () from /lib/libc.so.6 #8 0x00000000 in ?? () #9 0x285464e4 in ?? () from /lib/libc.so.6 #10 0xbfbfb998 in ?? () #11 0x284dcce1 in _UTF8_init () from /lib/libc.so.6 #12 0x285464e4 in ?? () from /lib/libc.so.6 #13 0x0825d928 in _CurrentRuneLocale () Previous frame inner to this frame (corrupt stack?) and just for fun, it's a different segfault this time :( ------------------------------------------------------------------------ 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/36084 -- Edit this bug report at http://bugs.php.net/?id=36084&edit=1

« previous php.bugs (#92255) next »