zixp
asked on
File sent by header stops sending halfway
I have a php system set up where people can log in and download files, that are stored outside of the WWW root. PHP sends the file via the header (after authentication). The problem is that the transfer stops about halfway. I have watched it download about half of the file, and it remains around 180kb (does not steadily drop down to 0.00 as I have seen from some sites), but then just gives up. Is this a limitation in my server or something? I am running Windows 2000 Advanced Server with IIS 5.0, mysql, and PHP 4.3.8. Thanks in advance.
If you ever for some reason have to worry about a script running forever (doubtful), then ignore_user_abort() should be called, passing the BOOL value of FALSE:
ignore_user_abort(FALSE);
However, don't use ignore_user_abort() if you won't be keeping a constant connection with the client.
ignore_user_abort(FALSE);
However, don't use ignore_user_abort() if you won't be keeping a constant connection with the client.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot, I used your code, and the file went through
Glad to help :)
To see your currrent time limit:
echo init_get("max_execution_ti
To set your time limit:
set_time_limit(3600); // An hour
To get rid of the time limit altogether:
set_time_limit(0);
As I said there are many things that could cause such a problem, but you may want to start from the simplest possibilities first.
Stuart Konen