Results 1 to 4 of 4
  1. #1

    Arrow 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!";

    ?>
    Goto http://nitroxhosting.com/test2.php to see the output.

    Any help is appreciated!

    Thanks,
    Jason

  2. #2
    Ok, figured out the problem. It's not logging into root to check.

  3. #3
    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)

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •