Why _POST is sometimes empty when textarea is sent to PHP

PHP 4.4 and PHP 5.2.3 under Apache 2.2.4 on ubuntu.

I am running Moodle 1.5.3 and recently had a problem updating the course. The variable $ _POST is empty, but only if a lot of text has been entered into the text field on the form. If only short text is entered, it works great.

I increased the value of post_max_size from 8M to 200M and increased the memory_limit to 256M, but that did not help. I doubled LimitRequestFieldSize and LimitRequestLine to 16380 and set LimitRequestBody to 0 without improvement.

I have a Google answer, but I could not find it.

The HTTP headers in firefox show the size of the 3816 content with the correct data, so it just doesn't reach $ _POST.

The system works fine until a few weeks ago. The only change was in / etc / hosts to fix the HELO problem using the exim4 email server.

I can replicate the problem on a development machine where Exim4 does not work, so I think this is just a coincidence.

Thank you for your help.

+5
source share
5 answers

Maybe this is not the size associated with the message, but how long the line is before the new line. If they use the Moodle WYSIWYG view, html will simply be placed on one line without interruption. If you go into html and click return about 1000 characters, will this work?

+1
source

, , ( , ).

-, access_log, , , firebug. (, Firebug .) . :

, :

/form.php
/directory/index.php

:

<form action="/directory" method="post">
...
</form>

, /directory URL-, Apache /directory/, ( $_POST).

+2

enctype ? , , .

$_POST :

file_get_contents('php://input');

, . .

+1

This seems like a problem with Apache or Apache / PHP. If $ _POST is empty, it hints that the HTTP server is not passing POST information to PHP. If I were you, I would explore the configuration of Apache.

0
source

This is obvious, but have you restarted /etc/init.d/apache2?

In addition, the error_log file should show some information about whether the message size has exceeded the set limit. Think about how to increase the number of details for troubleshooting.

0
source

All Articles