Sorry to bother everyone ... turns out the email module I am using had a set_time_limit function in it ...
 
I feel like a bit of a fool now ...
 
Michael.
-----Original Message-----
From: Michael Hazelden [mailto:[EMAIL PROTECTED]]
Sent: 21 October 2002 12:03
To: '[EMAIL PROTECTED]'
Subject: [PHP-WIN] Possible execution time bug?

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: smime.p7s
Description: application/pkcs7-signature

Reply via email to