|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-11-17 11:54 UTC] comments at doofer dot org
The script:
switch ($variable) {
case 1,2:
}
crashes. I typed it accidentally instead of this (which works as I intended):
switch ($variable) {
case1:
case2:
}
I have Apache 1.3.14 compiled with PHP4.0.3pl1 as well as mod_ssl (openssl) and mm. Compiled from scratch on the same machine as it is running. I'm also using the Zend Optimizer 0.99 for PHP 4.0.3.
Script to make Apache, PHP and all other items:
cd /usr/src/apache
./configure
cd /usr/src/php
./configure --with-apache=../apache --with-my-sql ; make ; make install
cd /usr/src/openssl
./config ; make
cd /usr/src/mm
./configure --disable-shared ; make ; make install
cd /usr/src/mod_ssl
./configure --with-layout=Del --with-apache=../apache --with-ssl=../openssl --wi
th-mm=../mm --activate-module=src/modules/php4/libphp4.a
cd /usr/src/apache
make; make install
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 09:00:01 2025 UTC |
My last comments did not accurately give an indication of how to reproduce the bug. I didn't realise at the time that it's the placement of the code that causes the problem. To reproduce the problem , put the code segment I gave (basically a parse error) in a function that is included from an included file. e.g. function myFunction($var) { switch ($var) { case 1,2: } } in a file myfunctions.inc allfunctions.inc includes file myfunctions.inc index.html includes allfunctions.inc access index.html -> crash I also noticed I did not have the Zend optimizer running or even loaded on the machine that I have this problem on. I can try the latest snapshot version, but here is a backtrace from 4.0.3pl1. Thanks, Derek GDB backtrace: GNU gdb 19991004 (gdb) run -X Starting program: /usr/sbin/httpd -X Program received signal SIGSEGV, Segmentation fault. 0x8112bed in _zval_ptr_dtor () (gdb) bt #0 0x8112bed in _zval_ptr_dtor () #1 0x81408b1 in execute () #2 0x813dbe6 in execute () #3 0x813e6b0 in execute () #4 0x813e6b0 in execute () #5 0x813e6b0 in execute () #6 0x8119408 in zend_execute_scripts () #7 0x80afc71 in php_execute_script () #8 0x8122ee9 in apache_php_module_main () #9 0x80ad91b in send_php () #10 0x80ad948 in send_parsed_php () #11 0x8146c93 in ap_invoke_handler () #12 0x815a999 in ap_some_auth_required () #13 0x815a9fc in ap_process_request () #14 0x81521ee in ap_child_terminate () #15 0x815239c in ap_child_terminate () #16 0x81524f9 in ap_child_terminate () #17 0x8152b26 in ap_child_terminate () #18 0x81532c3 in main () #19 0x408d39cb in __libc_start_main (main=0x8152f6c <main>, argc=2, argv=0xbffff9b4, init=0x807d3f0 <_init>, fini=0x81ff048 <_fini>, rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffff9ac) at ../sysdeps/generic/libc-start.c:92 PS: Happy Thanksgiving everyone.. was also why I haven't looked back at this until now :)