note 108607 added to function.set-time-limit

From: Date: Thu, 10 May 2012 07:51:20 +0000
Subject: note 108607 added to function.set-time-limit
Groups: php.notes 
Request: Send a blank email to php-notes+get-187563@lists.php.net to get a copy of this message
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: <?php require_once('db.php'); $stmt = $db->query($sql); while ($row = $stmt->fetchRow()) { set_time_limit(0); // your code here } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 82.116.32.80 ---- Manual Page -- http://www.php.net/manual/en/function.set-time-limit.php Edit -- https://master.php.net/note/edit/108607 Del: integrated -- https://master.php.net/note/delete/108607/integrated Del: useless -- https://master.php.net/note/delete/108607/useless Del: bad code -- https://master.php.net/note/delete/108607/bad+code Del: spam -- https://master.php.net/note/delete/108607/spam Del: non-english -- https://master.php.net/note/delete/108607/non-english Del: in docs -- https://master.php.net/note/delete/108607/in+docs Del: other reasons-- https://master.php.net/note/delete/108607 Reject -- https://master.php.net/note/reject/108607 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187563) next »