Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can I stop specific PHP script from Linux terminal?

How can I stop specific php script from linux terminal, without stop the other scripts ??

user-image
Question added by Osama Agha , Senior DevOps Engineer , Tabadul
Date Posted: 2013/09/13
Feras Abualrub
by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology

check the process id of the runing script

$ ps aux | grep php

 

 

then kill it by kill command

$ kill8754

Ali Al-Attar
by Ali Al-Attar , Founder , Iraqi Technological Academy

http://superuser.com/questions/403200/what-is-a-stopped-process-in-linux

 

Or just copy paste your quesiton on a google search and you should have some answers :)

 

Glad to find someone who is actually using Linux ;)

I am a Team Leader for3 Linux Communities but I am not a web developer :)

  341/5000 alkhatwat 1: ta'akkad min 'an 'akhta' albarnamaj alnnasi tahaddath fi safahat wib mutaeaddida'iidha kanat aleallamat alwahidat alty tazhar fi hadhih almushkilat hi risalat alkhata, wa'iidha kanat safahat alwayb taemal bishakl sahih, faymknk tajahul alkhata. aydaan, fi halat huduth almushkilat ealaa safhat wib 'aw athnyn, qad yakun sabab almushkilat hu tilk alssufahat. 'iidha qarrarat tajahul al'akhatta'i, yumkinuk taetil tashih 'akhta' albarnamaj alnnasi. Step 1: Make sure that script errors occur in multiple Web pagesIf the only flag appearing in this problem is the error message, and if the web pages are working correctly, you can ignore the error. Also, if the problem occurs on a Web page or two, the problem may be caused by those pages. If you decide to ignore the errors, you can disable script debugging.

Anil Mathew Kadakethu
by Anil Mathew Kadakethu , Technical Support Manager , M H Alshaya

ps -ef | grep -i <process name>

kill -9 process id

Osama Agha
by Osama Agha , Senior DevOps Engineer , Tabadul

How can I the kill the process if the script running from http (web server) 

Muhammad Anzar
by Muhammad Anzar , DevOps/DevSecOps Architect , Confidential

For stopping php script, you need to identify exact process and kill the specific process.

 

Example: You are running a php script named as example.php and when you are searching with the help of following command "ps -ef|grep php|grep example.php" which will give exact process details.

 

Once you identified the process, you will get process id from second column and  kill the process with process id with the help of following command "kill -9 <Process id>"

 

Please verify the php script after with the help of "ps -ef|grep php|grep example.php"

 

 

 

More Questions Like This