Page 1 of 1

Unable to kill processes

Posted: Wed Apr 13, 2005 9:40 pm
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..

Posted: Wed Apr 13, 2005 10:03 pm
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.

Posted: Wed Apr 13, 2005 10:16 pm
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..