PHP scripts by default are allowed to be executed for no longer than 30 seconds. The option is defined in the max_execution_time directive, and your PHP script will exit with the following error if it takes more time to execute than it is allowed;
Fatal error: Maximum execution time of 30 seconds exceeded in yourscript.php
There are a few methods that you can use to configure PHP time limit though some are not possible with cPanel because you don't have direct access to PHP's configuration file.
You can increase max_execution_time for PHP even when you're in cPanel hosting by using both ini_set() and set_time_limit() functions. It's also possible to use the .htaccess file method within cPanel.
You don't have direct access to php.ini configuration file in cPanel, but you can configure the option from cPanel's dashboard.
Comment anonymously. Login not required.