Problem with php post and long strings
I have a setup where users in a game can create and upload levels, in the form of a long text string.
The string is sent using php post and stored in a database using MySQL. The problem is that strings over 100kb are getting cuttoff.
I followed the Linode "Getting Started" guide to setup my Linode.
I have already uninstalled suhosin, disabled suhosin in php.ini and tried increasing the "suhosin.post.maxvaluelength" variable to no effect.
Any help or point in the right direction would be much appreciated!
/Robert
3 Replies
There are some file upload variables in php.ini and potentially in .htaccess
Are all large uploads getting cut off at the exact same point? Will you get the same size upload file if you upload a 101kb file, a 1001kb file and a 10001kb file?
MSJ
Yes all uploads are getting cut of at the same place.
I did some more testing today and realized the problem might not be caused by php. I created a quick test using the code below, and the entered text was correctly echoed after. The uploads are coming from mobile, so the problem might be originating there. Not sure what else could be causing it :/
<form action="<?php $_PHP_SELF ?>" method="POST">
The String:
</form>
Some browsers will limit the size of input text that is posted so it could be a browser specific issue. You can also check Apache's LimitRequestBody to see if it is limiting your post length.
Have you tried saving the string to a file and uploading a file rather than a string?