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.

Php as CGI or not.

Discussion in 'General Discussion' started by Vinayak, Jan 13, 2008.

  1. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    Ok I am configuring a fresh/new WHM/cPanel server after quite some time, and found that there are lot of option down there, till now on my old servers I have been using PHP as SAPI. But now CGI, FCGID, FastCGI and somany option are there, I am confused. So what are the good and safe options with Apache 2.2, should I use both PHP 4 & 5 or should I use only the latest to keep things simple and with least compatible issues. As for PHP version my preference is to use PHP 5 only on this server. SO what config should I use to keep the server environment most compatible with common/popular PHP scripts (forums, blogs, CMS etc.)

    Most I am confused is with these modules:
    Mod FCGID
    Mod SuPHP
    Suhosin for PHP
    CGI
    Fastcgi
    Force CGI Redirect
    Safe PHP CGI

    Do we need PHP as CGI/FastCGI to run ROR?

    Please recommend, your help is appreciated.
     
  2. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    given that php4 is at EOL, dont bother with that, run PHP as a cgi and install suPHP for that little extra security, ROR is nothing to do with PHP
     
  3. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    Thanks for your reply, do you think running PHP as a cgi and installing suPHP will have compatibility issues with various common and popular scripts out there. Till PHP4 my preference was PHP as SAPI. I think we can use PHP as SAPI and Suhosin for security.

    Any main benefit of PHP as CGI apart from that it runs as user?
     
  4. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    the benefit of running php as a cgi with suphp is that scripts run in the context of the user that owns them, therefore giving you a little more protection.

    We have run php as a cgi with an suexec wrapper since we started and can safely say we've had no problems at all with scripts, it also has no issues with suhosin (we run that as well)
     
  5. Vinayak

    Vinayak Well-Known Member

    Joined:
    Jun 27, 2003
    Messages:
    267
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Bharat
    cPanel Access Level:
    Root Administrator
    Thanks man, you made it bit clear for me.
     
  6. zigzam

    zigzam Well-Known Member

    Joined:
    May 9, 2005
    Messages:
    206
    Likes Received:
    0
    Trophy Points:
    16
    How much more resources does suphp require than normal php? I know the difference was quite a bit with phpsuexec and normal php.
     
Loading...

Share This Page