I have forgot to make a condition to stop a while loop in php. now it's running on

Abraham

New member
the server. how to stop it? It's running on the server! how to make the server to timeout? It has been 10 minutes and the loop is going on !!
It's a shared hosting.
Thank you
Thank you very much , samantha.
But I am not really expert.
It's a linux server.
Where should I write the command which you gave me?
Thanks a lot.
 
what kind of server?

in Linux run a "ps -ea |grep <programname> "
(replace <programname> with your programs name
that will give you the process id of the task and you can kill that process with the
'kill -9 <pid>"
(replace <pid> with the process id that you obtained in step one.


in Windows - Hit "Ctrl-Alt-Del" to bring up the task manager (you may have to choose "run task manager" in some versions of windows)
choose your program in the list and select "end task"


---edited ---

The command goes in the terminal. "ps" is the "process" command which lists all running processes. the "-ea" switch causes it to list the processes that belong to all users. If you ran the program yourself then you don't have to include the -ea switch; it will simply list only the programs running that were started by your user id.

the "kill -9 " command is a program that does what it says.. it "kills" a running process. the 9 basically kills any program immediately.

If you're terminal is locked you can simply open a new terminal session and kill the process from there (using the above steps). Also; depending on how you ran the program exiting the terminal you are in may also terminate any programming that's running from that terminal session.

if you want more information on this here's an article that explains it pretty well - http://www.linuxjournal.com/article/1332
 
Back
Top