PHP does not handle http requests bigger than a few KB

Bug #1611217 reported by HelloWello
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

I have recently upgrade Raspbian from wheezie to jessie. Now, "bigger" HTTP requests are no longer handled correctly by the web server/PHP/MediaWiki. The article content is truncated after about 6K characters and MediaWiki reports a loss of session.

Remark: Please also consider my description over at serverfault: http://serverfault.com/questions/795547/mediawiki-does-not-handle-edit-requests-for-larger-articles

Symptoms: I first recognized the error with my formerly working installation of MediaWiki (PHP). When I edit an article and its size grows bigger than approx. 6k characters, the article text is truncated and the MediaWiki rejects to save the new text but reports a lost session error. Smaller articles are not affected.

Context: At home, I recently updated my raspbian server from wheezy to jessie. It all worked well before.
* Operating system: Raspbian jessie (formerly wheezi) on a Raspberry Pi.
* Apache 2.4.
* phpinfo() shows no indication of suhosin, which is sometimes reported to cause problems with larger http requests. Also, other PHP parameters that are sometimes mentioned as relevant on the web are unsuspicious: PHP Version 5.6.24-0+deb8u1. max_input_time=60, max_execution_time=30, post_max_size=8M

What I tried so far:
* Other PHP program: To investigate further, I uploaded files through a simple PHP file upload script. Similar problem; file upload does not work. (For your reference, the code of the upload script was taken from here: http://www.codingcage.com/2014/12/simple-file-uploading-with-php.html The script uses simple form data, no Ajax, no JSON, ...)
* Larger file causes split: Moreover, larger http file upload requests (using files of several hundred KB) are seemingly split into two requests. The apache access log file shows (remember this is actually only a single request from the browser):
** ... - - [05/Aug/2016:10:52:38 +0200] "POST /simpleupload.php HTTP/1.1" 200 85689 "https://.../simpleupload.php" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0"
** ... - - [05/Aug/2016:10:52:38 +0200] "\xb4W\xcd\xff" 400 557 "-" "-" -
* Other browsers: The behavior can be replicated with different browsers: Firefox on Linux, Firefox 38 on Windows, and elinks browser on same machine.
* Eliminate network problems: I used elinks to access the webserver on localhost. Same problems in MediaWiki and the PHP file upload script.
* Increased Log level: Increasing the Apache LogLevel to debug does not bring up any new information during request handling.
* Error does not occur with Perl: The problem does not occur with a different file upload script written in Perl. File upload works properly. So, it does not seem to be a problem with OS, Apache, Browser, ...

Tags: jessie
Revision history for this message
HelloWello (retro-virus) wrote :

I did "aptitude install php5 php5-mysql libapache2-mod-php5" which replaced the installed libapache2-mod-php5filter with libapache2-mod-php5. This fixed my problem.

As I am not sure whether this is expected behavior of php5filter or not, I assume it is as expected, and consider this bug to be closed.

Pander (pander)
tags: added: jessie
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.