Long POST data is discarded by Sukhozin, which settings may be responsible?

I have an Apache server with a PHP script that receives data through a POST request with multiple fields. One of the fields can be very long, and when it reaches somewhere between 512 KB and 1 MB, it is discarded, i.e. E. The received POST does not contain this field at all, but other fields are present and OK.

Here are the current relevant settings in php.ini :

 upload_max_filesize = 64M memory_limit = 128M post_max_size = 128M suhosin.post.max_value_length = 64000000 suhosin.request.max_value_length = 64000000 

I am trying to send 1024 * 1024 characters in a single POST variable, and this variable is still discarded.

R. S. Can not find how to get the journal Sukhosin.

Update: I disabled Suhosin by specifying suhosin.simulation = On , and now the long data successfully passes to my PHP script. The problem is that I do not want to completely disable Suhosin, I only need to adjust the limit.

+4
source share
4 answers

I had to disconnect Sukhozin. Still not sure which parameter answers, since the ones I pointed out in the question did not help.

0
source

Try:

  • post_max_size
  • upload_max_filesize
  • memory_limit
+1
source

lightster answer here How to increase the maximum POST variable in PHP? helped me when suhosin configurations didn't:

"PHP 5.3.9 introduces the max_input_vars configuration parameter, whose default value is 1000. See the Runtime Configuration section of the PHP manual. The default and change log are at the top of the page.

You can change the value by updating the php.ini server, adding a .htaccess file, or adding a line to httpd.conf. "

I installed it in .htaccess:

php_value max_input_vars 2000

+1
source

I added:

suhosin.post.max_value_length = 64000000 suhosin.request.max_value_length = 64000000

In suhosin.ini and it worked.

Settings in php.ini:

upload_max_filesize = 64M memory_limit = 128M post_max_size = 128M

+1
source

All Articles