Jump to content

Configuring php for largish downloads.


drpop

Recommended Posts

Hello all,

 

I am setting up a webcart type site that uses php to deliver video downloads to its users. The video files are typically > 250Mb. All testing was done with smaller files, and now I am testing with the larger files things started to go pearshaped.

 

The download would be cut short after 'x' amount of time, I went ahead and assumed that the 'max_execution_time' of php.ini was causing this. I racked this up to an hour.

 

I aslo massivley upped the memory_limit.

 

My questions are: Do i need to up the mem_limit for downloads? Are there any performance problems inherant in allowing an hour for max_ex_time? similarly, could a very large mem_limit cause me other problems?

 

Thanks

DocPop

Link to comment
Share on other sites

Downloading files of that size over http is always problematic. A quote from the binary newsgroup I use....

 

Downloading large files over HTTP on the Internet can be tricky. To avoid the frustration of broken or corrupt downloads, observe the following suggestions when downloading from the Zip Manager:

*note: We do not give credit for broken or corrupt Zip Manager downloads if these suggestions were not followed.

 

Never download any zip file or zip segment that is greater than 255 Megabytes (MB) in size. If your zip file is greater than 255 MB, use a download manager to split the download into multiple parts.

 

This is a limitation of broken, or misconfigured, web cache servers operated by your ISP. These cache servers behave in unexpected ways when transferring files greater than 255 MB in size. They can induce corruption, or premature session termination.

 

The cache servers are usually transparent. You can't tell they are in place until they corrupt a download.

 

 

Use a download manager when ever possible. Avoid downloading large zips with your web browser. Configure your download manager to split your download into numerous parts. Make sure that each download segment is less than 255 MB. For example, if your zip file is 800 MB in size, you need to split the download into 4 parts. The download manager will automatically combine the parts into one whole file.

 

Not only does using a download manager increase reliability of downloading large files over the Internet, they also increase your download speed.

 

We recommend ReGet as a download manager. ReGet supports SSL as well.

 

 

Try to use the port 81 download links if possible. Most ISP's don't send port 81 traffic through their cache servers. Using port 81, you can effectively bypass your ISP's transparent cache servers. However, some ISP's try to cache port 81 as well as the default web port 80.

 

Do not try to resume a download on a different port then the download was started on. Your computer thinks that identical files on different ports are different files. If you switch ports, instead of resuming the file, your computer will start the download from the beginning.

 

 

If you must use a web browser to download from the Zip Manager, make sure the browser's cache is set to at least twice the size of the largest zip file you plan to download. If you are using IE, make sure to check both checkboxes under Tools|Internet Options|Advanced|HTTP 1.1 settings. You will have to restart your browser for these changes to take effect.

 

 

Under no circumstances should you use Netscape to download from the Zip Manager. The Netscape browser has a broken implementation of the HTTP/1.1 protocol. This causes Netscape not to resume unfinished/broken downloads.

 

 

Make sure you have the newest firmware in your cable/dsl router. This is especially important for linksys routers. Older firmware versions contained incorrect MTU values that caused corruption at high speeds.

 

 

If you are unlucky enough to get a corrupt or broken zip file, use PKZip to repair the zip and recover as many files as possible. PKZip has the best repair algorithms compared to other utilities.

Link to comment
Share on other sites

would love to  help you out

I am not sure what php.ini is

if you can explain, hit me

anyway, Youtube takes an hour to upload a 100 MB video

Perhaps you should wait like half a day to see things working

cus the sizes you are dealing with are huge

even Veoh takes time for such sizes, but they use a windows program which you can pause and restart

Link to comment
Share on other sites

Thanks for the replies.

 

Thorpe... Ive spoken to the authors of the webstore to see if they can implement an ftp protocal delivery method, or something similar. However my hopes are not that high. I may have to investigate another solution if http proves to be to problematic.

 

npsari... php.ini is a configuration file within that determines how various aspects of php work. Some of the settings I am changing pertain to how system resources are spent on php processes. I am not looking for an uploading solution, I have physical access to the server in the datacentre, so I am able to take the files on a portable harddrive. I am looking to deliver these videos to customers, as a file, rather than a stream.

 

Things appear to be working ok, however, it is in my nature to assume cos I have fiddled with things I don't truly understand, that things are going to go wrong soon.

 

I cross my fingers.

 

Cheers.

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.