Jump to content

PHP large file uploads: memory_limit ? max_execution_time?


akshay

Recommended Posts

Hello.

 

My script is set to upload files upto 5GB large.

 

For that script I've currently set memory_limit to 5GB. Is it alright?

 

I mean what is the ideal value (for large upload scripts)

 

If you feel, 5GB is large. I can make script to upload 2GB files and set memory_limit accordingly.

 

Also, max_execution_time has been set by me to 86400 currently. Assuming, on a 500Kbps broadband, it would require upto 24 hours to upload a 3-5GB file.

 

Please suggest.

 

Thank you.

Link to comment
Share on other sites

The execution of the script starts when the file is already uploaded. The web server handles the entire process and stores the uploaded file in a temporary directory, not in memory. You do not have to touch any of these PHP settings, but just the maximum size of the POST upload.

Link to comment
Share on other sites

Oh, good point.

 

But before I noticed when max_execution_time was set to 1000 sec. The Connection would give a "Connection Reset" error. Since I've set it to 172000 (2days), it works fine. My host reported they made some changes and asked me to confirm. You think it can be because my host actually "fixed" something on server?

 

Or, it's coz of newly changed PHP values (by me)? Please be sure.

 

Thank you.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.