Jump to content

Is there a way of killing all running PHP script in my linux hosting?


ShivaGupta

Recommended Posts

You are surprising me every time :confused:

 

What that question is :)

as the google 

First check all the PHP processes using the below command

ps aux | grep php

Then get all the Process Ids from the above command

ps aux | grep php | awk '{print $2}'

Then kill all the processes

kill -9 `ps aux | grep php | awk '{print $2}'`

i am try with

<?php

ps aux | grep php ;

ps aux | grep php | awk '{print $2}' ;

?>


and result is

Parse error: syntax error, unexpected T_STRING in /htdocs/public/www/tests/index.php on line 5 

help me out plz.........

Link to comment
Share on other sites

The only things that are going to stop running process PHP is are a  kill command and an apache restart. You cannot restart apache unless you are root (and if you were root you would not be asking how to stop a process). You can stry a kill command through a system() call, but if it's not your own private server and if the server is not setup very bady, you will simply not be able to do that.

 

Remember, everything is built and designed to prevent hackers and bugs from stopping processes arbitrarily....

Link to comment
Share on other sites

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.