Lets say I have a process running on Linux but do not know what the ID is. I know that we can kill a process by typing kill "PID-its PID number" at prompt but I do not want to do that.
Can I actually kill this process via a webpage not knowing its PID though? How can I do this? Pls provide an example.
Thanks James
Use exec() to run command line actions. I think PHP needs to be installed as a CGI for this to work. I'm not 100% sure on this so someone else give a more informative answer 😉
hi i have question, how i can kill the some process, if i know the pid? i can terminal the process by php CGI, but can't from the web!! why? pls tell me how to do, if i want from web to kill the process? TKS
php will be running as either the apache user or some other low-access user.
you can only kill your own processes.
there is no way around this unless you reconfigure your web server - its for security reasons.
can i use shell_exec() to run shell command to kill the process?
i have try but fail, no work, why?
or how to use the web to kill pid?
pls help me tks
Originally posted by samuelxin can i use shell_exec() to run shell command to kill the process? i have try but fail, no work, why? or how to use the web to kill pid? pls help me tks
See AliasZero's post.