#38845 [Opn->Fbk]: header('Location...') crash
ID: 38845
Updated by: tony2001@php.net
Reported By: klimpong at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Unknown/Other Function
Operating System: FreeBSD 5.2-CURRENT
PHP Version: 4.4.4
New Comment:
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
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
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.
Previous Comments:
------------------------------------------------------------------------
[2006-09-15 13:39:15] klimpong at gmail dot com
Description:
------------
Due to a mistake, we passed an unusual long String to header(), and the
webserver.
From /var/log/messages:
Sep 15 15:17:27 www5 kernel: pid 92266 (httpd), uid 80: exited on
signal 4
My String contains an urlencode() "SQL error", which I wanted to pass
on to the next page via GET.
The "SQL error" includes the query I issued (including the binary data
that was supposed to be saved to the database) and the error message
from MySQL.
We run Apache2, with PHP as a module.
Reproduce code:
---------------
Unfortunately, I cannot copy and paste it here. It's just too long. The
entire string passed to header() was 79600 characters long.
If needed I can upload it on a URL and add it later on as a comment.
The simple code is:
<?php
$str = 'Location:--really--really--long--string--';
header($str);
exit;
?>
Expected result:
----------------
I know that you are only supposed to send only 256 (?) characters over
GET, but for example I would expect the string to be cut off instead,
or header() to return false.
Actual result:
--------------
Webserver crashed.
From /var/log/messages:
Sep 15 15:17:27 www5 kernel: pid 92266 (httpd), uid 80: exited on
signal 4
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38845&edit=1
Thread (2 messages)