PDA

View Full Version : How can I catch the "Maximum execution time of 30s ..."


artemide
5-26-03, 07:59 AM
I have a script that creates thumbnails from larger pictures. Lately the script need more that 30s to complete because the pictures have become rather numerous. The script ends upruptly with "Fatal error: Maximum execution time of 30 seconds exceeded ". Is there a way to catch this error so I can make my script continue from where it left off?

HalfaBee
5-26-03, 06:10 PM
Have a look at this function
int register_shutdown_function ( callback function)


Registers the function named by function to be executed when script processing is complete.

and set_time_limit()

You may want to do the thumbs in batches instead of the whole lot.

HalfaBee