I have made a script that will run for a long time(set script execution limit to infinity). This is executing via ajax. now even if i close the browser tab its still executing(i am knowing it via a status log). So, if I want to stop this execution upon closing the browser tab, what should i do? Regards
Simply consider this: set_time_limit(0); for($i=0; $i<50000;$i++){ // A lot of insert/update to database here... } Code (markup):
If you have cpanel or another control panel, look in your process list (Under Apache Status), find the PID # for the process that won't stop, and run "kill PID" in a ssh prompt.