Hi,
I've got problem with file download. I've tested it and I think that problem might be on the server side, but I'm not sure.
My file has about 20MB, so it's rather big. File isn't corrupted because I've downloaded it via ftp. When I'm trying download it from my web page everything is fine, but I've noticed that in certain moment file is being saved on hard disk without finishing it. For example right now file has about 7,8 MB. It happens everytime when I'm trying to download something big from my webpage.
Did anybody have the same problem? How can I resolve it?
Big file download problem
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Thanks for reply, Oliver.
Well, I can't change anything because my account is on public web serwer and I don't have access to configuration files.
phpinfo() tells me that max_execution_time is 30 s. I found that putting the file into buffer will help, but it won't. Besides you've implemented very similiar script to that which I've tested - I mean this one when there isn't readfile function.
I've resolve this problem in a different way - when filesize is more than 8 MB script redirects directly to file. It gives you possibility to download a file, but file name is hashed so it dosn't looks well. It's only temorary solution, until I will find a better one, or someone give me a hint.
Well, I can't change anything because my account is on public web serwer and I don't have access to configuration files.
phpinfo() tells me that max_execution_time is 30 s. I found that putting the file into buffer will help, but it won't. Besides you've implemented very similiar script to that which I've tested - I mean this one when there isn't readfile function.
I've resolve this problem in a different way - when filesize is more than 8 MB script redirects directly to file. It gives you possibility to download a file, but file name is hashed so it dosn't looks well. It's only temorary solution, until I will find a better one, or someone give me a hint.
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact:
Well, good hint. Thx. I'll try to use it, but it won't be so good for space on web server, especially when theres not only one file this size - for example let it be 5 files for 20 MB, so when I make a copy there will be 200 MB of occupied space. I am thinking about fake files which will have few kB, but theres a problem too. Such file will be download without any problems and there won't be necessery to put a right file. In that case I would have to cheat the script. I must think about it...
- Oliver Georgi
- Site Admin
- Posts: 9906
- Joined: Fri 3. Oct 2003, 22:22
- Contact: