Jump to content

Script won't Stop ? I've destroyed everything yet it still runs...


Recommended Posts

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?

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..

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.

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.

 

 

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.