Results 1 to 4 of 4
Thread: HELP: Problem with EXEC output
-
04-28-2005, 09:36 AM #1Disabled
- Join Date
- Sep 2004
- Posts
- 303
HELP: Problem with EXEC output
Hey,
I am creating a script for SHOUTcast, to manage it through the browser in PHP, instead of having to use shell and make it hard for new people.
I got some help from another member, and all works fine in SSH, but when I goto output it into PHP using the EXEC command, all as I get is a - (dash/minus)
My code is:
PHP Code:<?php
echo "Checking ports for SHOUTcast<br><br>";
echo "Found SHOUTcast on port 8000 with PID ". exec("netstat -napt | grep LISTEN | awk '/8000/ { print $7; }' | awk -F/ '{ print $1; }'");
echo "<br><br>Checking complete!";
?>
Any help is appreciated!
Thanks,
Jason
-
04-28-2005, 10:18 AM #2Disabled
- Join Date
- Sep 2004
- Posts
- 303
Ok, figured out the problem. It's not logging into root to check.
-
04-28-2005, 10:32 AM #3Disabled
- Join Date
- Sep 2004
- Posts
- 303
If anyone knows how to login to root user using PHP, please help me out. Otherwise how do I unsuspend the root user in cPanel? (not sure why it's suspended)
-
04-28-2005, 05:31 PM #4Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
Please, for the love of all that is mighty -- do not enable your scripts to run as root -- otherwise, you'll have big holes in your security. I'm talking big -- like the size of the grand canyon big.