note 38896 added to function.fpassthru

From: Date: Sat, 10 Jan 2004 14:57:04 +0000
Subject: note 38896 added to function.fpassthru
Groups: php.notes 
Request: Send a blank email to php-notes+get-63266@lists.php.net to get a copy of this message
In reply to spam at flatwan dot net This might save someone some time. I created a program to list some rather large files and create links for the end user to click on in order to download them (using the php function fpassthru()). The problem I was having was it would make it half way through the download (about 377 megs) and the script would terminate and the download would stop. After doing some shotgun troubleshooting I discovered the php config option 'max_execution_time = 30'. Upon changing it to 'max_execution_time = -1' the files >370 megs can be downloaded without the script aborting. The best way to do this would to be: <?php @ignore_user_abort(); @set_time_limit(0); ?> This only changes these settings for the script that calls them. (Thanks to (I don't remember who) who wrote a form mail script that used these two lines) ---- Manual Page -- http://www.php.net/manual/en/function.fpassthru.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38896 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38896&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38896&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#63266) next »