TheFilmGod Posted January 17, 2010 Share Posted January 17, 2010 By mistake, I decremented the loop counter instead of incrementing it. This made the loop go forever and add thousands of records into mysql. (Thank god for testing!) I fixed the issue, but is there anyway that I could stop a php page executing forever? Does php have some auto stop feature? ** CORRECTION: After 5 minutes, the page continued to execute! How could i stop it? I deleted the page via ftp. Show that fix it? Quote Link to comment https://forums.phpfreaks.com/topic/188809-never-ending-loop/ Share on other sites More sharing options...
waynew Posted January 17, 2010 Share Posted January 17, 2010 Use can set a time limit for your scripts: http://php.net/manual/en/function.set-time-limit.php Quote Link to comment https://forums.phpfreaks.com/topic/188809-never-ending-loop/#findComment-996787 Share on other sites More sharing options...
Maq Posted January 17, 2010 Share Posted January 17, 2010 I fixed the issue, but is there anyway that I could stop a php page executing forever? Does php have some auto stop feature? Sure. In what regard would you like to stop the script from executing? (time, number of loops, etc...) Quote Link to comment https://forums.phpfreaks.com/topic/188809-never-ending-loop/#findComment-996827 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.