kool_samule Posted March 7, 2011 Share Posted March 7, 2011 Hi Chaps, I have a PHP app that allows users to login and view contents of an FTP folder (that is unique to their login). They can upload and download files but some users are having problems. As some of the files can be quite large, the app seems to be a bit tempremental when uploading files. Also, when downloading very large files, sometimes in excess of 200-300 Mb, the script seems to timeout. The script reads the file to be downloaded, then loads it to the header, to force open/download. But again, this is very tempremental and there's nothing much to go on in terms or trouble-shooting. Everytime I test it, it seems to work, but users are having trouble. I have checked the Windows IIS 7/PHP file settings, and all are OK. So my questions are: 1. what is the best way to handle very large file uploads? 2. what is the best way to force open/download of large files, without PHP having to 'read' the file first? Any help or guidence would be most appreciated. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/229874-php-managing-files/ Share on other sites More sharing options...
nafetski Posted March 7, 2011 Share Posted March 7, 2011 You will want to look at the following settings in php.ini upload_max_filesize post_max_size max_execution_time You definitely shouldn't have to read the entire file into PHP before serving it. Just setting the appropiate headers should do the job, then let apache handle delivering the file. Quote Link to comment https://forums.phpfreaks.com/topic/229874-php-managing-files/#findComment-1184029 Share on other sites More sharing options...
kool_samule Posted March 7, 2011 Author Share Posted March 7, 2011 thanks for the reply, it's on a windows iis7 server. would that make a difference in using the different headers. also, where can i find the correct header info, so that php doesn't have to read the entire file? cheers Quote Link to comment https://forums.phpfreaks.com/topic/229874-php-managing-files/#findComment-1184044 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.