Scott- you got me thinking. When you asked your question I decided I'd
better go read up on the timeout directive in Apache to make sure I
understood what it actually controlled. If I understand the documentation
for the timeout directive correctly, it seems (in my case) it is only
concerned with the time between sending a packet and receiving confirmation
of receipt from the client. I configured my PHP script so it would call
set_time_limit(0), set the timeout in Apache to 45 seconds and restarted
everything. Then I pointed the PHP script to 2GB file. Happy to report the
download completed and it took well over 45 seconds.
Seems like I incorrectly assumed the Apache timeout was playing some role
in my issues. It appears to have been due solely to the max_execution_time
setting in PHP.
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Scott Klement <web400@xxxxxxxxxxxxxxxx>. |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|12/30/2009 12:09 PM |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|Re: [WEB400] PHP Apache Functions |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
I don't understand your scenario. Why would the size of a file relate
to whether it times out?
MattLavinder@xxxxxxxxxxxxxxxxxxx wrote:
We are trying to write a PHP Script to control a file download. Files
can
get pretty large, so in the script we are trying to add code to ignore
any
timeout settings. The way to do this is by calling set_time_limit(0) and
apache_reset_timeout() every so often while PHP reads the file. This
allows the one script to run for a long period of time, but we can still
enforce a timeout for our other scripts. When I try to call
apache_reset_timeout(), I get an error saying it is undefined. Haven't
found anything to indicate that these functions requires any special
extensions. Are the Apache functions missing from the IBM i version of
PHP?
Matt
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
______________________________________________________________________
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/web400..
As an Amazon Associate we earn from qualifying purchases.