php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38845 header('Location...') crash
Submitted: 2006-09-15 13:39 UTC Modified: 2006-09-23 01:00 UTC
From: klimpong at gmail dot com Assigned:
Status: No Feedback Package: Unknown/Other Function
PHP Version: 4.4.4 OS: FreeBSD 5.2-CURRENT
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-09-15 13:39 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-15 13:47 UTC] tony2001@php.net
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.


 [2006-09-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Nov 30 04:05:54 2022 UTC