soma56 Posted August 16, 2010 Share Posted August 16, 2010 I have a script that is mostly written in PHP with a little JS Ajax for updating. It won't stop. There are some cookies and a couple of simple sessions. I've created a 'destroy' page which destroys the session and deletes the cookies but the program still won't stop. I've deleted the files from the server - the script doesn't exist - and yet if I upload the script after several minutes it updates where it left off. I simply can't figure out how to stop of otherwise 'destroy' this script. What I've tried: A redirect page that includes the following: unset($_SESSION['FOR-EACH-SESSION']); setcookie("FOR-EACH-COOKIE", "", time() - 42000); session_unset(); session_destroy(); die; exit; Deleting the script from the server does not stop the script. Yes, if I go to the script after the files have been deleted I receive a 404 error naturally. Yet, when I upload the files again the script still starts off where it left off, it has sessions from the server that still exist. I don't get. Is there anything else I can do? Quote Link to comment https://forums.phpfreaks.com/topic/210817-script-wont-stop-ive-destroyed-everything-yet-it-still-runs/ Share on other sites More sharing options...
RussellReal Posted August 16, 2010 Share Posted August 16, 2010 ok.. what script are we talking about.. ur js/ajax? just close the browser.. the php script you made once it is deleted and off the server it shouldn't be running at all.. and when you re-upload it.. it will just be another file on your server.. Quote Link to comment https://forums.phpfreaks.com/topic/210817-script-wont-stop-ive-destroyed-everything-yet-it-still-runs/#findComment-1099705 Share on other sites More sharing options...
soma56 Posted August 16, 2010 Author Share Posted August 16, 2010 ok.. what script are we talking about.. ur js/ajax? just close the browser.. the php script you made once it is deleted and off the server it shouldn't be running at all.. and when you re-upload it.. it will just be another file on your server.. Tried that and that's what's mind-boggling. It's PHP loop using ajax. I've deleted the files from the server, cleared my cookies, cache, disconnected the internet, tuned off the computer - and 20 minutes later when I turn everything back on and upload the files it's still running in the loop. Quote Link to comment https://forums.phpfreaks.com/topic/210817-script-wont-stop-ive-destroyed-everything-yet-it-still-runs/#findComment-1099706 Share on other sites More sharing options...
kenrbnsn Posted August 16, 2010 Share Posted August 16, 2010 Can you post the code? Also, when you delete the script from the server, did you try running it without uploading again? If it still runs, then you deleted the wrong file. Ken Quote Link to comment https://forums.phpfreaks.com/topic/210817-script-wont-stop-ive-destroyed-everything-yet-it-still-runs/#findComment-1099707 Share on other sites More sharing options...
soma56 Posted August 16, 2010 Author Share Posted August 16, 2010 Yes, that would seem to be the obvious thing to miss and initially I hoped for that. Yes, if I go to the script after the files have been deleted I receive a 404 error naturally. Yet, when I upload the files again the script still starts off where it left off, it has sessions from the server that still exist. This is a real puzzle. The script is quite long and complex. I'll see if I can create a revised version for here. In a nutshell: PHP is performing functions As the status changes I use php to amend a specific file with content for the user I then use Ajax to grab the contents of that page and display it to the user This all happens in a loop very quickly - over and over again. It has successfully stopped some times. While other times I'll start a new session only to find a contamination between the old one and new one. Again, deleting ALL the files on the server did not solve the issue. Quote Link to comment https://forums.phpfreaks.com/topic/210817-script-wont-stop-ive-destroyed-everything-yet-it-still-runs/#findComment-1099710 Share on other sites More sharing options...
RussellReal Posted August 16, 2010 Share Posted August 16, 2010 ok.. heres what you can do to solve all your problems.. delete the scripts in question.. tell your webhost to kill the process of your php.. then restart your web server... they should fulfill this request with no problem Quote Link to comment https://forums.phpfreaks.com/topic/210817-script-wont-stop-ive-destroyed-everything-yet-it-still-runs/#findComment-1099922 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.