suphp ?

Discussion in 'General' started by bhanuprasad1981, Feb 13, 2010.

  1. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    i am having little issues of spam , in apache we enable suphp to replace "nobody" with account name , how can this be done in litespeed ?
  2. NiteWave

    NiteWave Administrator

    Server-->General-->PHP suEXEC:Yes
  3. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    i tried it but sites ending showing permission errors thought i made all folders 0755 still :(
  4. NiteWave

    NiteWave Administrator

    the detail error message? may need investigate them one by one.
  5. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    generally in suphp it used to be permission issues where folder with 0777 has to be changed to 0755 is it not same here ? and i see two options per home directory or whole which is good ?
  6. NiteWave

    NiteWave Administrator

    From the menu tips:

    "When set to yes, PHP script will be executed under the user specified, as well as the group unless Force GID is set.

    When set to "User's Home Directory Only", scripts outside a user's home directory will run as the global user/group that the web server run as. "

    you can try either of them, see which fits your site best.
  7. mistwang

    mistwang LiteSpeed Staff

    If Apache suPHP works properly, Litespeed PHP suEXEC should work equally well. You also need to take care of the permission of parent directory as well.
  8. UWH-David

    UWH-David Active Member

    We presently run Apache2.2 with PHP 5.2.x in suPHP with modsecurity. Our servers have been running this configuration for quite a long time now with hundreds of clients each. I have read nothing but rave reviews regarding LiteSpeed Enterprise. From what I gather from LiteSpeed threads and articles I can drop LiteSpeed in to replace Apache. Is this entirely true? What issues may we encounter with clients configurations? Custom php.ini's no longer work correct? Is the LiteSpeed suxec mode using the phpsuexec? Is phpsuexec still even being developed?

    What are the performance benefits of LiteSpeed php suexec vs Apache22 suPHP?

    Thank you.
  9. NiteWave

    NiteWave Administrator

    My understanding, mod_php/phpSuExec/suPHP are 3 different apache modules.

    in which, mod_php has best performance, suPHP is slowest since it run as CGI.

    lsphp is php with LSAPI to work with litespeed web server. It can run as global user/group(e.g. nobody) which is like mod_php, also it can run in suExec mode as user's privilege. and they can run at the same time --- some lsphp processes run as global user, while some lsphp processes run in suExec mode.

    We did some bechmark tests regarding various PHP a few months back, and posted the result on our blog:

    Litespeed is apache interchangeable. however, you need rebuild php with LSAPI to work with litespeed. custom php.ini should work as before and no need change, or minimum change only -- for example, the php extension's directory.
  10. UWH-David

    UWH-David Active Member

    I already understand the difference in the modules. Your response does not address all of my inquiries.

    So you are saying custom php.ini files in an accounts folder now work? I have read in other threads this no longer works and users must convert their custom php.ini files into .htaccess

    I have already read the benchmark at that address, where does it compare LiteSpeed with phpSuExec vs Apache2.2 suPHP?

    is phpSuExec even still being developed?

  11. NiteWave

    NiteWave Administrator

    I managed to test lsphp5 with suExec enabled and disabled under a cPanel server in our lab.

    ~>ab -k -n 20000 -c 100
    suExec enabled:
    Requests per second:    2723.91 [#/sec] (mean)
    suExec diabled:(run as nobody)
    Requests per second:    2659.31 [#/sec] (mean) 
    so no difference in benchmark -- above test without opcode cache.

    for other questions -- may need other staff's reply.:)
  12. UWH-David

    UWH-David Active Member

    It is faster when phpsuexec is enabled? That does not sound right at all.

  13. NiteWave

    NiteWave Administrator

    From my simple testing, it is. Technically, running as nobody or as other user should have no much difference. in our blog, already address it:"There is little performance impact for LiteSpeed to run in suEXEC mode; therefore it can achieve security benefit of suPHP without losing performance while CGI-based suPHP is the biggest loser in this test."

    please refer:

    I just tested it on our cPanel test machine --- it's working. I put a phpinfo.php in a user's home directory. it shows "Loaded Configuration File" is "/home/ausername/php/php.ini".

    so if you've read posts before this one(04-25-2009), custom php.ini should not work. it's a feature since lsws 4.0.2. also in 4.0.2's change log:
    Last edited: May 24, 2010

Share This Page