Possible execution time bug?
| From: | Michael Hazelden | Date: | Mon, 21 Oct 2002 11:03:15 +0000 |
| Subject: | Possible execution time bug? | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16453@lists.php.net to get a copy of this message | ||
Hi all,
I've got an interesting situation and I'm trying to figure out if I'm
going nuts or not.
I have a number of command line scripts which I am running via scheduled
tasks on Windows 2000 ... these scripts are required to run for long
periods of time - so I have set the maximum execution time to 0 so that
they will never time out.
All this is fine and I can get the scripts to run for as long as I want
(PHPINFO confirms the settings).
But - I'm having problems when I try to have a script that controls the
running of these other scripts. The easiest way I found to get the
scripts to run was to include them ... but on the second include of a
long time - the script exits with a message saying that the maximum
execution time of 30 seconds has been breached.
This can be got around using the set_time_limit function - but surely I
shouldn't have to!!
To give you an example:
include("auto118.php"); //runs a script for 30 minutes
include("auto1182.php"); //attempts to run another script for 30 minutes
This will bomb out during the execution of auto1182.php with the max
time error.
But:
include('auto118.php');
set_time_limit(10000000000);
include('auto1182.php');
will work.
I should add that this isn't limited to command line scripts - I've
tried this via apache and get the same problems. Always with the second
large included file. What's weird is that I also include a number of
class files at the top of the script and these are never affected by
this problem.
Is this a bug? Or am I just mis-understanding the nature of the
max_execution_time and includes? I would really appreciate any insight
anyone can give.
Please Help!!
Michael.
Attachment: [application/x-pkcs7-signature] smime.p7s
Attachment: [application/x-pkcs7-signature] smime.p7s