|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40938 BUG #38263 (Binary data corrupted on multipart form-data) still exists (4.4.x)
Submitted: 2007-03-28 17:51 UTC Modified: 2008-07-11 21:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: ass3mbler at gmail dot com Assigned: iliaa (profile)
Status: Wont fix Package: HTTP related
PHP Version: 4.4.6 OS: Linux Gentoo 2.6.x
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-03-28 17:51 UTC] ass3mbler at gmail dot com
The BUG #38236(,correctly addressed and fixed in the PHP 5.x codebase, is still present in the PHP 4.4.x codebase. I've tested and reproduced the same problem with many installations ranging from PHP 4.4.0 to PHP 4.4.6 included. 
I've used the relevant patches from iliaa for the files:
/main/php_variables.c (


adapting them for the 4.4.x codebase, and they seems to work correctly. The patches are available here: 
patch for php_variables.c =>
patch for rfc1867.c =>

Reproduce code:
Same as BUG #38236(

Expected result:
BUG #38236(

Actual result:
BUG #38236( Seems fixed applying the attached patches


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-13 14:15 UTC] eugene dot ware at nextharbour dot com
This bug seems to be present with PHP 4.4.7 even though it looks like these patches have been applied to it.

In particular, posting a multipart form containing a file as one of the parts that has 0 or NULL characters in it stuffs up and the $_FILES array is not populated, and reading from php://input seems to truncate the data (losing a large part of the start of the data).

Is this bug still open?
 [2008-07-11 21:22 UTC]
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 01:01:28 2024 UTC