Uploads greater than 64 kilobytes corrupted when using Apache mod_fcgid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Apache 2 mod_fcgid |
Fix Released
|
Unknown
|
|||
libapache2-mod-fcgid (Debian) |
Fix Released
|
Unknown
|
|||
libapache2-mod-fcgid (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: php5
I run a Mediawiki server which I just recently upgraded to Lucid Lynx. My wiki's users originally reported issues with uploading PNGs, but further testing on the actual server along with a VM show that it is not MediaWiki itself that is doing this but PHP. Using a very simple HTML and PHP script setup, I uploaded several files, mainly images but I also uploaded .ZIP files as well. Under PHP 5.3.2 even using either my full live system or a very basic setup*, all files greater than 64 kilobytes were corrupted at about the 64 kilobyte mark. The amount of corrupted data varies but it doesn't appear to be more than about 32 kilobytes.
However, in stark contrast, PHP 5.2.10 in Karmic Koala running in another VM works just fine using the exact same "very basic setup".
Both of these setups are running x86-64 installs. I have yet to try x86-32 installs.
This might be an upstream issue in PHP 5.3.2 since they ditch mime_magic in favor of fileinfo, so I am going to test this in other distributions, notably Debian.
-----
Testcase to reproduce the bug:
- install the following packages: php5-cgi apache2-mpm-worker libapache2-
- download the testcase from comment #13: http://
- extract it to /
- execute the command: sudo chown -R www-data:www-data /var/www && sudo service apache2 restart
- go to http://
- compare the md5sum of the original file with the uploaded file in /var/www/upload/, if they match the bug is fixed
Related branches
affects: | php5 (Ubuntu) → libapache2-mod-fcgid (Ubuntu) |
Changed in libapache2-mod-fcgid (Debian): | |
status: | Unknown → Fix Committed |
Changed in libapache2-mod-fcgid (Ubuntu): | |
status: | Confirmed → Fix Released |
summary: |
- Uploads greater than 64 kilobytes corrupted under PHP 5.3.2 + Uploads greater than 64 kilobytes corrupted when using Apache mod_fcgid |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in mod-fcgid: | |
status: | Unknown → Fix Released |
Changed in libapache2-mod-fcgid (Debian): | |
status: | Fix Committed → Fix Released |
Actually, as it turns out, it's more an Apache problem than a PHP problem. I tried to downgrade PHP, but it turns out that it won't work. Instead, I brought PHP to Lucid's level, but installed Apache from Karmic, and that solved the problem. At this point, I suspect that I might have a buggered config, or there may be a bug in Apache that needs addressing.