ID: 17193 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Operating System: RH Linux 7.2/Apach 1.3.22 PHP Version: 4.1.2/PHP_4_2_0 New Comment:
Doesn't seem to happen with HEAD. Previous Comments: ------------------------------------------------------------------------ [2002-05-14 16:26:52] [EMAIL PROTECTED] Here's the back trace. Still happens with current 4_2_0 CVS. I'm checking HEAD right now. (gdb) bt #0 0x00000000 in ?? () #1 0x403d03d6 in apache_php_module_shutdown_wrapper () at mod_php4.c:795 #2 0x08051148 in run_cleanups (c=0x8107e04) at alloc.c:1713 #3 0x0804f681 in ap_clear_pool (a=0x80903d4) at alloc.c:538 #4 0x08062f70 in standalone_main (argc=1, argv=0xbfffea94) at http_main.c:5030 #5 0x08063b24 in main (argc=1, argv=0xbfffea94) at http_main.c:5417 #6 0x401af647 in __libc_start_main (main=0x8063640 <main>, argc=1, ubp_av=0xbfffea94, init=0x804e3f0 <_init>, fini=0x807c770 <_fini>, rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbfffea8c) at ../sysdeps/generic/libc-start.c:129 It looks like register_shutdown_function is no longer performing as it has in the past. I'll follow up this in another bug report. ------------------------------------------------------------------------ [2002-05-14 01:19:08] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. You can find ho wto make a backtrace on the location mentioned above. Derick ------------------------------------------------------------------------ [2002-05-13 19:25:57] [EMAIL PROTECTED] If you call register_shutdown_function, and then in the registered function make a call to getenv, Apache segfaults. Here's a sample script: <?PHP function shutdowner() { $out = fopen("/tmp/env.out", "at"); fwrite($out, "getenv returned " . getenv("HOME") . "\n"); fclose($out); } echo "Getenv returned " . getenv("HOME") . "\n"; register_shutdown_function("shutdowner"); ?> Please note. This only happens when running as an apache module. CLI works fine, and I'd assume that CGI does too. I'll post a back trace if some kind soul will explain how to do it under RH linux using the messed up !apachectl method that they use to start apache. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17193&edit=1