-5
Good morning, how to cancel an Infinite Loop in the Script that is already running on the server?
It was a routine I created to trigger emails, but by carelessness it is in infinite loop and the process does not stop.
It is already in progress on the server, and I wanted it to stop running, how do I interrupt the script?
Who
script
is this? Who executes, aCRON
? Post more information, more details...already tried to give arestart
in theapache
?– Kenny Rafael
I will try to re-start the server and check if it stops and give a feedback
– Ale
@Kennyrafael Resolved giving Restart, was worth the answer!
– Ale
Need more details! Running on Windows or Linux? Where’s the code? How do you know it’s running?
– Wallace Maxters
@Wallacemaxters why talk like that ? It sounds like he’s screaming... The guy’s already solved.
– Diego Souza
@Gumball I ask why so much mimimi? I’m not screaming. It was just an exclamation sign. The question is not clear at all, and the person who answered practically "kicked". It is impossible to give a complete answer to an incomplete question.
– Wallace Maxters
@Wallacemaxters I knew it was running because it was sending emails every second over and over. You wrote in right tone, really it was a desperate occasion. kkkkk.. grateful for the interest, would have helped me.
– Ale
@Alexandrec.Caus welcome to Stackoverflow. My exclamation had no "evil intentions". Is that the site needs to have enough details in the question to help you (and also help other people, because if it is well described, other people will find your problem and will have the solution when looking at your question).
– Wallace Maxters
@Alexandrec.Caus see that PHP may have already stopped, but the server has the emails in the output queue. Don’t necessarily stop sending once you finish the script. But if the situation is very critical and you are close to the server physically, you always have a plan b :P http://i.stack.Imgur.com/etDFj.jpg
– Bacco
@Bacco Great his explanation, but as he had given a rest of 1s(Sleep) it did not occur. Fortunately, if it would not have bigger problems.
– Ale
@Alexandrec.Caus may want to limit your script to fixed batches, and call in CRON (or task scheduler if it’s in Windows). There’s a lot of questions on the website about that if you need to.
– Bacco
Are you talking about long Polling? Or a process that has nothing to do with PHP, but would you like to control via php? See if this makes sense http://answall.com/a/127477/3635. Note: I am not negative, but if you detail the answer I can vote to reopen.
– Guilherme Nascimento