Bug 48554

Summary: mod_fcgid corrrupts POST data
Product: Apache httpd-2 Reporter: iamsoordinary
Component: mod_fcgidAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: P2    
Version: 2.2.14   
Target Milestone: ---   
Hardware: PC   
OS: FreeBSD   

Description iamsoordinary 2010-01-15 07:12:35 UTC
Using Apache 2.2.14 (or 2.2.13) with mod_fcgid 2.3.4 and PHP fast cgi (any PHP version, I tried a dozen before realizing the problem was not in PHP) corrrupts POST data when doing an upload (form encoding type = multipart/form-data), at least with large uploads (a couple hundred KB or more). I've only seen this with JPEG images which get all messed up, but it probably happens with other files too. Some (very few) images seem to upload OK: it might be that they are not affected or that they are little affect and still display right. The size of the original image and of an uploaded damaged imaged is exactly the same. However, using vbindiff I can the that the damaged image has lots of changed bytes.

To resolve this issue which was causing major trouble in my production server, I downgraded to mod_fcgid 2.2 (which is the previous version available in the FreeBSD ports). Being so, I cannot show a live example of the bug.

To reproduce the bug, just use any PHP upload script, for example: http://php.about.com/od/advancedphp/ss/php_file_upload.htm
Comment 1 Jeff Trawick 2010-01-15 07:21:42 UTC
grab this fix: http://svn.apache.org/viewvc?view=revision&revision=826829

*** This bug has been marked as a duplicate of bug 48021 ***