I\'m having a problem with my PHP file that takes more than 30 seconds to execute.
After searching, I added set_time_limit(0);
at the start of the code,
Checkout this, This is from PHP MANUAL, This may help you.
If you're using PHP_CLI SAPI and getting error "Maximum execution time of N seconds exceeded" where N is an integer value, try to call set_time_limit(0) every M seconds or every iteration. For example:
query($sql);
while ($row = $stmt->fetchRow()) {
set_time_limit(0);
// your code here
}
?>