why does downloading timeout in this script?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
keyvan1
Forum Newbie
Posts: 1
Joined: Mon Jun 09, 2008 9:32 am

why does downloading timeout in this script?

Post by keyvan1 »

hi,
i have a php proxy script and i have installed it on my website
when downloading through proxy it downloads the first 6 to 7 mb of data.if the file is greater than 7 mb it timesout what can i do for that
ofcourse i my connection speed is 128 kb
but can the code be changed so that it does not timeout?
i have attached the code
Attachments
p.rar
(12.53 KiB) Downloaded 3 times
nowaydown1
Forum Contributor
Posts: 169
Joined: Sun Apr 27, 2008 1:22 am

Re: why does downloading timeout in this script?

Post by nowaydown1 »

My guess is that you're blowing out the PHP memory limit (From line 857):

Code: Select all

 
$_response_body .= $data;
 
I believe the default memory_limit is 8M. Concatenating the file contents into a string like that is going to eat up memory like crazy.
Post Reply