At 16:27 24.02.2003, Mathieu Dumoulin spoke out and said: --------------------[snip]-------------------- >Thank you, but it doesn'T explain why i can run the other script for 5 >minutes without any set_time_limit > >i'd like to get a precise explanation on why it's doing it, for the time >being i will use set_time_limit for this script. --------------------[snip]--------------------
PHP times the time that the script itself needs to execute, neglecting any external resources, be it database access, or e.g. fetching pages from other servers. For example, fetching a page from, say, www.ibm.com (I chose this because of its lengthy load time here in Europe), one pass needs approx. 5 seconds (including the page fetch of course). Looping this script will run much longer than 30 secs time limit, because time is consumed outside the current script. OTOH, running an endless loop not doing anything outside, e.g. just incrementing a number, will terminate after quite precisely 30 secs - all the time is consumed _within_ the script. For lengthy import/export routines I usually resort to doing 5-10 records in one pass (or more, that depends of course), then sending echo '<script>document.location.href="' . $_SERVER['PHP_SELF'] . '?' . SID . '";</script>'; exit; using sessions to store the current import location and status. HTH and clears things up, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php