5K AJAX Upload Limit

Asked by:
Ganymede / 11 Points
Time:
2013-01-25 9:53 pm EST
Category:
General Server Setup
Hits:
596
I'm using POST to upload simple text. Everything has been working fine for the last couple weeks until I hit a size-limit somewhere. All my text is being cut off at 5K, according to the filesize of all my text files.

Javascript doesn't have a limit on string size, so it can't be that.

AJAX doesn't have a limit on POST, (unlike GET, which does).

I went to look at my php.ini file for limits (I'm familiar with the 8M limit, but I've never heard of a 5K one), and I don't even see a php.ini file anywhere in my directories. I did a full search. I'll probably end up uploading the default one from the Apache site, but it would be nice to know why it wasn't supplied with my account.

Does anyone know what could be causing this strange text limit?

To ask this user for more information, please first login.

To submit an answer, please login.

Best answer chosen by User

0

JacobN
Staff
3,713 Points
2013-01-25 10:56 pm EST
Hello Ganymede, and thanks for your question.

You can upload a custom php.ini file to your /public_html/ directory and then use the steps from our guide on how do I make my php.ini file recursive in order to use those settings for your entire site.

Otherwise your account will just use the server-wide defaults in the main php.ini file that your user doesn't have access to. I went ahead and made a copy of the server's default php.ini file and left it in your /public_html/ directory if you wanted to modify any of the settings.

Currently your PHP post_max_size setting is set at 128M so it shouldn't be this limitation that is causing your upload cut off problems. Your max_input_time is also set to 60 which should be allowing enough time for sure to upload more than 5K worth of data, same with max_execution_time being set to 30.

I used a quick PHP upload script and confirmed I could upload an 11K text file without issues. I left this test up for you at /Development/test if you'd like to look through it.

I took a look at your /Development/file.php script which seems to be where the POST data is getting sent to, one thing I noticed is that you have a line mentioning this:

if (file_exists("upload/" . $_FILES["file"]["name"]))

{

echo $_FILES["file"]["name"] . " already exists. ";

}



However there is no /upload/ directory anywhere on your account. When you're uploading files below 5K in size are they successfully being uploaded to the server at all currently?

- Jacob

To submit a comment on this answer, please first login.

Want to share this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}