InMotion Hosting Support Center

Large file uploading problem

Category: Server Usage

2013-06-19 9:48 am EST

Hits: 2,956
I have Elite Dedicated Server and i have a code which is done in php. When i am trying to upload less than 280MB file it works fine. if it is more than that i could not get it .
Please check
Before some months i got same problem then i have increased MAX_FILE_UPLOAD_SIZE then it was working fine upto last one month. now it is not working.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

I have contacted your live chat agent, He tells me again and again it is code error you know that there is no code error because small files are uploading correctly
8 Points
2013-06-19 09:52 am EST
i have nothing in my code only this 1.testmy_upload.php file content: "<form name="largeupload" method="post" enctype="multipart/form-data" action="send_upload.php" >
<input type="file" name="myfile" id="myfile" />
<input type="submit" name="Submit" id="submit" value="Submit" />
</form>" 2. send_upload.php file content: "<?php

if( move_uploaded_file($_FILES['myfile']['tmp_name'], 'uploads/' . $_FILES['myfile']['name']))
echo 'Uploaded Successfully';
echo 'Cant Upload Try Again!';
8 Points
2013-06-19 09:55 am EST



43,761 Points
2013-06-19 12:42 pm EST
Hello spskumar,

I tested your code on my own server. I am able to successfully upload smaller files, (100 - 200MB, etc) but when I attempt to upload larger files (mytest file is 540MB) it seems to sit there uploading and then forward to the send_upload.php URL. In my case, I get a connection reset. Is this the behavior you are seeing? Also, is this something you absolutely need? Php is not designed for transfer of larger files, whereas FTP is. You may want to consider creating a public FTP account if that is feasible for your situation.

Best Regards,
Scott M

You must login before you can post a comment about this answer.

Yes i am also think the connection resets because i am not getting anything in this($_FILES['myfile']) if it is larger file . I am giving facility to my users to upload their own videos to my site and sharing with their friends. I cannot give ftp-details to all my registered users for uploading video they need to upload on the same page by clicking upload button. so what can i do. it was working before a month i have uploaded around 1GB file. Please look at following link so that you can understand what i want to do
Thank you very much
8 Points
2013-06-20 12:24 am EST
Hello spskumar!

Sorry for all the trouble with your file uploads not working. You should be able to <a href="" target="_blank">change the below settings in your php.ini file</a> and your HTML form.
<h4>php.ini changes</h4><strong>Increase the upload_max_files</strong>
<code>upload_max_filesize = 1024M</code>
<strong>Increase the php memory limit</strong>
<code>memory_limit = 1024M</code>
<strong>Increase the max_post_size</strong>
<code>post_max_size = 1024M</code>
<h4>HTML form changes</h4>Add the below hidden input into your form

<code>&lt;input type="hidden" name="MAX_FILE_SIZE" value="1024000" /></code>

You will also need to <a href="" target="_blank">make your php.ini recursive</a>. Also, if you don't see your php.ini then you can restore it to your public_html folder.

Best regards,
James R
5,889 Points
2013-06-20 12:12 pm EST
Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Need more Help?


Ask the Community!

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

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!