Unable to kill processes

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shenosuke
Forum Newbie
Posts: 4
Joined: Sun Mar 27, 2005 11:00 pm
Contact:

Unable to kill processes

Post by shenosuke »

G'day everyone..

Right now, I'm developing a PHP page that will kill active processes - test.php

Code: Select all

<?
exec('kill -9 $process_id_to_be_killed', $error);

if($error)
{echo &quote;Something's wrong&quote;;}

else
{echo &quote;All is all right&quote;;}
?>
and when I tried to run it on the URL bar
(xxx.xxx.xxx.xxx/~(my userid)/test.php), nothing happens, meaning that the processes is still alive n kicking!

Any idea guys ( 'N gurls :) )? Thanx..
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

What are you trying to kill with a PHP script. Are you on a dedicated server or shared. If you're on shared you probably shouldn't be trying to kill anything (MHO) and I doubt your user has access to that command.
shenosuke
Forum Newbie
Posts: 4
Joined: Sun Mar 27, 2005 11:00 pm
Contact:

Post by shenosuke »

I'm running on a dedicated server. Actually, I'm developing a web-based real-time gateway monitoring system, which includes a function that will unable a user to kill a process and, start it up again. I tried to put the PHP file in the public_html directory, which would enable a user to execute commands such as the kill command.
So that you know, I'm a student, so I've really scarce knowledge bout this kinda things..

Mahalo (thanx) again..
Post Reply