You are here:  » Maximum execution time of 30 seconds


Maximum execution time of 30 seconds

Submitted by GeXus on Sun, 2006-03-19 02:25 in

Hello,
Sometimes I will receive the above error. Where can I change this to a larger number? I saw no reference to 30 in the code.

Thank You!

Submitted by support on Sun, 2006-03-19 07:00

Hi,

You need to add the following line to the top of your script (before you include MagicParser.php):

set_time_limit(0);

The value of 0 means "unlimited". However, it is possible for your host to prevent this function from being used (part of the safe mode feature), in which case you will need to contact your host and explain that you are using a PHP script that will take longer than 30 seconds and request that the maximum execution time limit is removed on your account.

More information on set_time_limit() is here:
http://uk.php.net/manual/en/function.set-time-limit.php

Hope this helps!
David.

Submitted by GeXus on Sun, 2006-03-19 12:13

That seems to have done the trick! Thanks so much!