From:             klimpong at gmail dot com
Operating system: FreeBSD 5.2-CURRENT
PHP version:      4.4.4
PHP Bug Type:     Unknown/Other Function
Bug description:  header('Location...') crash 

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 bug report at http://bugs.php.net/?id=38845&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38845&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38845&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38845&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38845&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38845&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38845&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38845&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38845&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38845&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38845&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38845&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38845&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38845&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38845&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38845&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38845&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38845&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38845&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38845&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38845&r=mysqlcfg

Reply via email to