Results 1 to 5 of 5

Thread: How to check if a server is Suexec or not?

  1. #1
    Join Date
    Sep 2008
    Location
    Nashik
    Posts
    51

    Thumbs up How to check if a server is Suexec or not?

    To check the server is Suexec or not? follow the one of the steps which suitable with your privileges

    1) Login into you server with the root login details and run following command

    [root@xx.xx.xx.xx ~]#/usr/local/cpanel/bin/rebuild_phpconf --current

    If server is Suexec then result would look like

    DEFAULT PHP: 5
    PHP4 SAPI: suphp
    PHP5 SAPI: suphp
    SUEXEC: enabled


    2)If you are not sure about Shell then you can also check the SuExec is enabled or not? from your WHM.Lgin into your WHM and in the menu find Configure PHP and SuExec

    Check the drop down box for "PHP 4/5 Handler" - and if beside that it says "suPHP" - Then your sever is SuExec enabled

    3) If you are not having server root login details or WHM access.Then you can create a php file udner your account from cPanel >> File Manager and change the permissions on that file to 777 and open it in a browser. If it gives 500 Internal Server Error, your most probably running suPHP.

    4)As well as you can also create the phpinfo page under your account from your cPanel >> File manager For ex. phpinfo.php with the following code

    <? phpinfo() ?>

    After creating phpinfo.php page browse it http://yourdomainname.com/phpinfo.php and if it shows

    Server API = Apache then server is not running PHP in Suexec mode

    And if

    Server API = CGI the server is running PHP in Suexec mode
    Regards,
    Gunjan Sonar

  2. #2
    Join Date
    Sep 2008
    Location
    Nashik
    Posts
    51

    Arrow Check SuExec status by using suexec_log

    You can also check SuExec status for your server by using following logs.

    As SuPHP activity is logged in
    /usr/local/apache/logs/suexec_log
    . If you tail it, you will see if there is any current activity:

    Code:

    tail -f /usr/local/apache/logs/suexec_log
    Last edited by Gunjan; 09-15-2008 at 12:24 AM.
    Regards,
    Gunjan Sonar

  3. #3
    Join Date
    Sep 2008
    Location
    Nashik
    Posts
    51

    Default To check the SuExec configured value on cPanel server

    To check the SuExec configured values use following command suexec -V on shell.
    root@server [~]# suexec -V
    It will give you following result.

    -D AP_DOC_ROOT="/var/www"
    -D AP_GID_MIN=100
    -D AP_HTTPD_USER="apache"
    -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
    -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
    -D AP_UID_MIN=500
    -D AP_USERDIR_SUFFIX="public_html"
    If SuExec is not enabled on server then it will give you following result after running the suexec -V command on shell.
    root@server [~]# suexec -V
    [root@server ~]# suexec -V
    -bash: suexec: command not found
    Regards,
    Gunjan Sonar

  4. #4
    Join Date
    Dec 2010
    Posts
    1

    Default

    A BIG THNX TO YOU ALL.i reallly need this information.

  5. #5
    Join Date
    Jun 2011
    Posts
    1

    Thumbs up A huge thank you

    Mate, I specifically signed up here to say THANK VERY MUCH for your post. I had this issue, Host said that its a Joomla problem not PHP.

    I knew it had something to do with PHP because I had just Migrated the site from a previouse server and was working fine but not here...

    Thanks again.

Bookmarks

Posting Permissions

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