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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.