PHP error “Maximum execution time of 30 seconds exceeded in home/httpd/…”

To overcome this, in your code, put the following PHP statement

set_time_limit(300);

This will allow for 300 seconds for timeout. After the program ends, then reset by:

set_time_limit(30);