Jump to content

PHP support for files over 2 gb?


bond00

Recommended Posts

I have searched all over and have found conflicting information surrounding this topic. Does PHP support files over 2 gb? I use Autoindex to download my files away from home. Files larger than 2 gb do not appear when the directory is scanned and displayed by the PHP script. I have tried multiple other download scripts and all have the same results. Some throw errors from the functions filemtime() or filesize()...basically any function that analyzes the large file.

I heard PHP 5.2 fixed this so I installed it...still doesn't work. I've also heard that Apache has the limitation. Does anyone out there have additional info on how I can access my larger files? Thanks
Link to comment
https://forums.phpfreaks.com/topic/31615-php-support-for-files-over-2-gb/
Share on other sites

This really has little to do with php. HTTP does not support files over 250mg, anything larger and FTP is recommended. Its not called 'File Transfer Protocol' for nothing.

HTTP simply wasn't designed for large files. Sure, you can try, but just beware of its limitations.
Ummm...HTTP does support files larger than 250 mb. If you look at any iso file, larger than 250 mb (nearly 700 mb) for download (live Linux cd or whatever), they give you the option to download via HTTP or FTP. Additionally, I'm able to download from my "HTTP" server just fine for files under 2 gb as I stated above.

I would love for you to point me to a reliable source where it says HTTP supports file transfers of only up to 250 mb, but to me that statement really doesn't make sense. It's a protocol. It doesn't count the number of bytes being sent continuously in one connection...it merely provides the protocols for the connection.

Any other help?
Ok... well Ive done some searching and it seems most of the infomation Ive based my call on is actually located in a newsgroup provider I use to download large binneries.

I cannot give you link as its a payed site, however here is some of what Ive read on that site.

[quote]
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.

1. 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.

2. 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.

3. 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.

4. 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.

5. 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.

6. 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.

7. 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.
[/quote]

This newsgroup provider is specifically setup to search newsgroups for large files so they do know what they are talking about, and I would consider this some pretty reliable advice.

Having said that, Yes, I have also downloaded isos of 700mg or more via http with no problems, but Ive also had curruptions. Reading the above it seems it may not actually be HTTP itself, but something to do with isp's caches.

Im not saying it can't be done via HTTP, I just wouldn't recommend it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.