Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default confusion in suPHP, suPHPexec and Apache suEXEC

    Hello Guys,

    I am bit confuse about modules suPHP, suPHPexec and Apache suEXEC. Can anybody tell me the basic difference between these three?

    Also, what is the difference between PHP handler dso and cgi?

    Thanks,

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by thewebhosting View Post
    Hello Guys,

    I am bit confuse about modules suPHP, suPHPexec and Apache suEXEC. Can anybody tell me the basic difference between these three?

    Also, what is the difference between PHP handler dso and cgi?

    Thanks,
    SuExec forces all CGI scripts to run as the user. This can include PHP if PHP is set to run as CGI.

    SuPHP forces all PHP scripts to run as the user (assuming PHP is set to run as SuPHP)

    PHP as an Apache module is DSO. This is the default in a cPanel/WHM environment and results in PHP running as user nobody.

    PHP as CGI will run PHP scripts as if they were CGI scripts. This has several side effects such as the script_name Superglobal variable returning the PHP CGI binary rather than the script.

    cPanel/WHM no longer natively supports phpSuExec, we now use SuPHP instead.

  3. #3
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    Thank you so much for the detailed explanation!!

  4. #4
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    We have installed both the versions of PHP. PHP4 and PHP5. PHP5 is set to default version of PHP.

    PHP 5 Handler - dso
    PHP 4 Handler - cgi

    Can I run both PHP versions as dso or cgi?
    Last edited by thewebhosting; 05-14-2009 at 01:46 PM.

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    10,720
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by thewebhosting View Post
    We have installed both the versions of PHP. PHP4 and PHP5. PHP5 is set to default version of PHP.

    PHP 5 Handler - dso
    PHP 4 Handler - cgi

    Can I run both PHP versions as dso or cgi?
    You cannot run both as DSO (at least not without some special patching). However you can run both as CGI if you desire.

  6. #6
    Member
    Join Date
    May 2008
    Posts
    1,114

    Default

    Quote Originally Posted by cPanelDavidG View Post
    You cannot run both as DSO (at least not without some special patching). However you can run both as CGI if you desire.
    Thanks for the information!

  7. #7
    Member DeepXP's Avatar
    Join Date
    Feb 2005
    Posts
    51

    Default

    Hi,

    Can anyone tell me disadvantages of running the Apache under suPHP?

    Thanks
    Deep

  8. #8
    Member
    Join Date
    Jun 2003
    Posts
    27

    Default

    Quote Originally Posted by DeepXP View Post
    Hi,

    Can anyone tell me disadvantages of running the Apache under suPHP?

    Thanks
    Deep
    Speed, speed, speed.
    In other words, it's slow.

    However depending on your requirements, you may not notice much of a difference. It just depends how much you need to squeeze out of your server, and the type of content you are serving.

  9. #9
    Member
    Join Date
    Mar 2008
    Posts
    133

    Default

    Im sorry to revive this topic but is Apache suExec incompatible with suPHP? I mean, is there something which should not be run besides with suPHP?

    I ask this because on a quad core, Apache with 50 incoming connections almost crashes the server with 50 load, each process, even simple blogs, or simple php scripts take a hell of amount of % CPU.

    I was wondering is this is because of suPHP or something is not normal on my setup. When people say suPHP is slow and that it has a performance hit, of how much are we talking against PHP in DSO mode? 20% slower or 500% slower?

    I really find it hard to believe apache cannot run more then 50 php scripts connections.

  10. #10
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    Quote Originally Posted by nibb View Post
    Im sorry to revive this topic but is Apache suExec incompatible with suPHP? I mean, is there something which should not be run besides with suPHP?
    Both SuExec (for CGI/Perl scripts) and SuPHP (for PHP scripts) may be used simultaneously without issues, excluding any performance differences between the PHP handler.

    Quote Originally Posted by nibb View Post
    When people say suPHP is slow and that it has a performance hit, of how much are we talking against PHP in DSO mode? 20% slower or 500% slower?
    Performance will vary depending on the unique activity and usage on the specific servers involved, including differences in activity of the hosted sites, how resource-intensive some scripts or sites may be, and potential abusive activity that may also be contributing to increased load.

    I would evaluate the load and usage to determine which account or accounts are generating most of the load and decide if administrative action needs to be taken to suspend or disable certain accounts.

  11. #11
    Member
    Join Date
    Mar 2008
    Posts
    133

    Default

    Ok thanks. I installed LiteSpeed to do a test. And it seems its PHP that is the problem. Since Litespeed builds the same PHP you had before and the load is somehow reduce but it did not improve.

    That means my PHP build is the problem. About the scripts and sites, I dont think that is possible, they are not custom PHP scripts but pretty standard run on every webhosts, wordpress, phpbb, smf, etc. None of them are high traffic, but the load sometimes just goes crazy and with "top -c" its shows "Php" as taking more resources.

    So LiteSpeed did no helped allot, but at least I know PHP is now the problem. I do have a little suspicious but Easy Apache did not warned me about. When I compiled Apache I use suPHP without memcache or anything else because I was not sure if those are standard, I only selected eAcelerator. So the build runs fine. But I readed somewhere that suPHP doesnt support any kind of caching, that includes eAcelerator. Is this truth?

    That means every PHP is generated from 0 instead of having it cached, which could explain why with so little requests the load gets so high. An Admin told me its MySQL but the strange is that MySQL is not on Top of high cpu usage, its always php proccess, and not a specific one, but from several users.

  12. #12
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,554
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    Quote Originally Posted by nibb View Post
    When I compiled Apache I use suPHP without memcache or anything else because I was not sure if those are standard, I only selected eAcelerator. So the build runs fine. But I readed somewhere that suPHP doesnt support any kind of caching, that includes eAcelerator. Is this truth?
    Using SuPHP allows you to find out which specific users are consuming the most CPU/RAM resources (e.g., while monitoring via "top" for example).

    It is true that eAccelerator has little to no usefulness when used while SuPHP is enabled; for eAccelerator to work you'd need to use either DSO or FastCGI, but with this you would lose out on the security benefits of SuPHP. I would recommend SuPHP for its security benefit over DSO, FastCGI, and eAccelerator.

Similar Threads & Tags
Similar threads

  1. Securing a new cPanel server, suExec, suPHP etc
    By Dragooon in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-19-2011, 07:53 AM
  2. apache suexec and suphp
    By liang3391 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-22-2009, 01:16 AM
  3. register_globals=on for suexec/suphp ?
    By meeti in forum cPanel and WHM Discussions
    Replies: 26
    Last Post: 03-30-2009, 04:28 AM
  4. SuPHP and SuExec - pros and cons
    By mambovince in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-22-2008, 05:55 PM
  5. using suexec and suphp and pspsuexec.
    By FourMat in forum New User Questions
    Replies: 2
    Last Post: 01-17-2008, 01:46 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube