Search code examples
postapache2php-5.3php

PHP fails to parse large post variable


I'm trying to pass a rather large post request to php, and when I var_dump $_POST array, one, the most large, variable is missing. (Actually that's base64 encoded binary upload as part of a post request)

Funny thing, that on my development PC exactly same request is parsed correctly, without any missing variables.

I checked out contents of php://input on server and development PC and they are exactly the same, md5 matches. Yet development PC recognizes all variables, and server misses one. I tried changing many different options in php.ini, and got zero effect.

Maybe someone will point me to the right one. Here is my php://input (~5 megabytes) http://www.mediafire.com/?lp0uox53vhr35df


Solution

  • It's possible the server is blocking it because of Suhosin extension.

    http://www.hardened-php.net/suhosin/configuration.html#suhosin.post.max_value_length

    suhosin.post.max_value_length

    Type: Integer Default: 65000 Defines the maximum length of a variable that is registered through a POST request.

    This will have to be changed in the php.ini.

    Keep in mind that this is different than the Suhosin patch which is common on alot of shared hosts. I don't know if the patch would cause this problem.