Problem with php post and long strings

Hi,

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

Robert,

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

Hey MSJ, thanks for answering.

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>

Try uploading a from your mobile using WiFi instead of the cell service. That should let you see if it's your cell provider causing the problem.

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?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct