The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

install suPHP

Discussion in 'General Discussion' started by blackmetal, Oct 31, 2008.

  1. blackmetal

    blackmetal Registered

    Joined:
    Feb 2, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello,
    1)does necessary install suPHP on server ?
    2)what does suPHP do exactly and if i install it on my server there is not any conflict for my users script?
    3)i want install suphp on my whm... can anybody help me how can i install it?(i search about this issue but i do not find suitable topics)

    Regards,
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    It is not necessary to install SuPHP on the server, but it is considered to be a good thing to do.

    It runs all PHP scripts as the user in whose account they reside - rather than running all scripts as user nobody. It also prevents scripts that have insecure permissions from running.

    Most PHP scripts will run well within a SuPHP environment. However, some older not well-maintained scripts that rely on insecure permissions may experience issues in a SuPHP environment.

    It's easy. Simply go to the WHM interface and in the Software section click Apache Update. Proceed through the build process until step 5, then select the checkbox for Mod SuPHP. Proceed to compile Apache via the WHM interface. When done, you will be prompted regarding how you wish to have PHP run - select SuPHP.

    If you do not see this prompt, you can set this in WHM -> Service Configuration -> Configure PHP and SuExec. Note, in 11.24, this has been moved to WHM -> Service Configuration -> Apache Configuration -> PHP and SuExec Configuration.
     
  3. blackmetal

    blackmetal Registered

    Joined:
    Feb 2, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    thanks for help me...
     
  4. lorio

    lorio Well-Known Member

    Joined:
    Feb 25, 2004
    Messages:
    243
    Likes Received:
    3
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    When using suPHP I see a big lag when accessing a php page for the first time 5sec vs. 1sec for the second php generated page.
    When using mod_fcgid the lag is a bit shorter.

    Is there an way to shorten that lag for low frequented websites unter suPHP? E.g. that php5 stays longer up (if that is the main reason). For fcgid there are some optimization hints.
     
  5. nineseven

    nineseven Member

    Joined:
    Nov 18, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I have folloed the instructions above on install suPHP but now when i try and access my website I get the followign error

    Code:
    Redirect Loop
    
    Redirection limit for this URL exceeded.  Unable to load the requested page.  This may be caused by cookies that are blocked.
    
    The browser has stopped trying to retrieve the requested item. The site is
    
     redirecting the request in a way that will never complete.
    
        *  Have you disabled or blocked cookies required by this site?
    
       *  NOTE: If accepting the site's cookies does not resolve the problem, it is probably a server configuration
    
            issue and not your computer.
      
    I have no idea on how to solve this. Could anyone give me some advice

    Many Thanks in advance
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Rename the .htaccess file in public_html and then try to access the site. If it works then, you've got some code in that .htaccess file that will need updated or removed. Note the .htaccess file is a "hidden" file, so you'll need to set your FTP client to view it. Or select the option to view dot files in cPanel file manager when you first open the FM from within cPanel itself.
     
  7. olivehosteur

    olivehosteur Member
    PartnerNOC

    Joined:
    Jan 21, 2009
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I installe mod suphp

    but my files created in php are always in nobody nobody

    root@centos [/home/olivier/www/tmp]# ll
    total 20
    drwxrwxrwx 2 olivier olivier 4096 jan 21 14:58 ./
    drwxr-x--- 11 olivier nobody 4096 jan 21 14:34 ../
    -rw-r--r-- 1 nobody nobody 0 jan 21 14:58 compteur.txt

    my script:
    -------------------------------------
    $monfichier = fopen('tmp/compteur.txt', 'wr+');

    $pages_vues = fgets($monfichier); // On lit la première ligne (nombre de pages vues)
    $pages_vues++; // On augmente de 1 ce nombre de pages vues
    fseek($monfichier, 0); // On remet le curseur au début du fichier
    fputs($monfichier, $pages_vues); // On écrit le nouveau nombre de pages vues

    fclose($monfichier);

    echo '<p>Cette page a été vue ' . $pages_vues . ' fois !</p>';-
    ---------------

    my vhost:

    ServerName olivier.com
    ServerAlias www.olivier.com
    DocumentRoot /home/olivier/public_html
    ServerAdmin webmaster@olivier.com
    ## User olivier # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
    suPHP_UserGroup olivier olivier
    </IfModule>
    <IfModule !mod_disable_suexec.c>
    SuexecUserGroup olivier olivier
    </IfModule>
    CustomLog /usr/local/apache/domlogs/olivier.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/olivier.com combined
    ScriptAlias /cgi-bin/ /home/olivier/public_html/cgi-bin/



    and in WHM I have configured suphp:

    Option Configured Value
    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler none
    Suexec on
     
    #7 olivehosteur, Jan 21, 2009
    Last edited: Jan 21, 2009
  8. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Read the message you posted.

    It says you have a "redirect loop" setup.

    IE: pages redirecting to each other

    Doesn't sound like a SuPHP problem or anything related

    I would look first at the code for the page you are trying to view
    and then to any .htaccess files you might have in or above the directory
    where the web file you are trying to view is located noting any redirects
    or "Location" headers placed in those files.
     
Loading...

Share This Page