Re: A question about max_execution_time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 10 April 2006 11:30, Eric Butera wrote:
> Dear List,
>
> I have been working with a PHP script that curls a file from another
> server.  This works fine on my local machine, but not on our live server.
> The script takes about 400 seconds to execute completely.  I was under the
> impression that my call to set_time_limit(900); was helping.  Well, I took
> that line out and nothing changed locally or on the server.  In fact I even
> tried this little test:
>
> <?php
> // header include for my config (to get Util)
> error_reporting(E_ALL);
> echo '<br>max execution time: '. ini_get('max_execution_time');
> sleep(40);
> echo "<br>done!";
> echo "<br><br>Script Executed Time: ". Util::displayMicroTime(
> $_SCRIPT_START_TIME, Util::getMicroTime() );
> die('<br>'.__FILE__.__LINE__);
> ?>
>
>
> Outputs:
> max execution time: 30
> done!
>
> Script Executed Time: 40.01
> /Users/eric/Sites/test/member_get_update.php26
>
>
> Now why did this work?  Shouldn't the script have timed out after 30
> seconds?
>
> Thanks in advance!
>
> Eric

The information in set_time_limit() might help:

http://us3.php.net/set_time_limit

"Note:  The set_time_limit() function and the configuration directive 
max_execution_time only affect the execution time of the script itself. Any 
time spent on activity that happens outside the execution of the script such 
as system calls using system(), stream operations, database queries, etc. is 
not included when determining the maximum time that the script has been 
running."

HTH

-- 
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux