Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

By soft downloaded, I mean PHP reads the file from outside of the web document directory and then "softly" render the download of the file by readfile() function. You know what I mean.

Anyway, it seems I can only provide download this way of files that are no more than 40MB in size. I tried to add set_time_limit(), it doesn't work.

So I suspect that my host may have some limitations somewhere in place. In what way can they do that? In PHP.ini or apache2.conf? Except cutting the files into smaller chunks, is there any other way I can circumvent this?

share|improve this question
    
Have you discussed this with your hosting provider? I would have thought that should be the first step. –  John Gardeniers Sep 16 '09 at 4:48

2 Answers 2

up vote 1 down vote accepted

As I search google there several people complaining about issues with read file and large files.

You should probably re-ask on stackoverflow for an equivalent to readfile that avoids memory limits.

Except cutting the files into smaller chunks, is there any other way I can circumvent this?

Sorry, what is your objection here? Do you mean you don't want to break this up into multiple files? On the readfile document page there is an example function 'readfile_chunked' that would read/output the file a bit at a time.

share|improve this answer

thanks to all who tried to answer this question for me. I contacted my host support and it turns out it's mod_fcgid that has prevented me using PHP to provide download of files larger than 40MB.

They explicitly disabled it on the website in question and it's all right and working as expected now.

Thanks again!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.