#21756 [Opn->Fbk]: Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in Apache
| From: | sniper@php.net | Date: | Mon, 20 Jan 2003 06:04:36 +0000 |
| Subject: | #21756 [Opn->Fbk]: Accessing $_SERVER['PATH_INFO '] causes intermittent segfault in Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-30617@lists.php.net to get a copy of this message | ||
ID: 21756
Updated by: sniper@php.net
Reported By: php@lost.co.nz
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Linux/Apache (Debian 3.0r1)
PHP Version: 4.3.0
New Comment:
Sounds pretty unlikely for the crash being caused
by unset variable/array index.
And btw. If you conditionally include() files, then
you MUST use { } with the clauses:
http://www.php.net/manual/en/function.include.php
(Example 12-6)
Maybe this caused the crashes?
Previous Comments:
------------------------------------------------------------------------
[2003-01-19 14:34:35] php@lost.co.nz
If the special global $_SERVER['PATH_INFO'] is accessed in scripts on
either my test or production server when it is not set (on load of home
page usually) it causes Apache to segfault intermittently (like 1/100
page views...).
eg, this is what caused me grief:
if( $_SERVER['PATH_INFO'] == 'whatever')
include( 'whatever_else');
Wrapping in call to 'isset' stopped crashes:
if( isset($_SERVER['PATH_INFO']) )
if( $_SERVER['PATH_INFO'] == 'whatever')
include( 'whatever_else');
Was really hard to reproduce. In the end I sat at a split screen
comparing the error to the access log, second by second. The error log
was reporting ~100-300 segfaults a day untill I used the call to isset,
when that dropped to zero. (After a fun 6 hours trying to catch it
with gdb...)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21756&edit=1