Best PHP Handler for APC

Discussion in 'PHP' started by semprot, Oct 20, 2013.

  1. semprot

    semprot Well-Known Member

    For a busy website, which one is the best PHP handler that i plan to use with APC in term of performance and security (i read that DSO can leave a hole if one of the script has a bug) ?
    Is it suphp / dso / fcgi / cgi ?
    I asked this because i think my latest PHP upgrade caused my previous php handler selection to be lost, and i can't remember what handler that i used.

    Code:
    myusername@mybox [~]# /usr/local/cpanel/bin/rebuild_phpconf --current
    Available handlers: suphp dso fcgi cgi none
    DEFAULT PHP: 5
    PHP4 SAPI: suphp
    PHP5 SAPI: suphp
    SUEXEC: enabled
    RUID2: not installed
    myusername@mybox [~]# /usr/local/cpanel/bin/rebuild_phpconf --available
    Available handlers: suphp dso fcgi cgi none
    PHP4 SAPI: cgi
    PHP5 SAPI: not installed
    SUEXEC: available
    RUID2: not available
    
    Thank you.
     

    Attached Files:

    Last edited: Oct 20, 2013
  2. NiteWave

    NiteWave Administrator

    > Is it suphp / dso / fcgi / cgi ?
    in fact these are terms / concept in apache way.
    litespeed's solution is lsapi php --- lsphp

    your current vBulletin heavily use APC variable cache, which is shared by all the php process which start / stop frequently, and you have several accounts each account has its own website, the only way is lsphp + suExec demon mode.

    you can try XCache too --- which may be better than APC in your case, in both performance and security. Security-wise, APC's variable cache can be viewed / read by all accounts, while XCache have the feature which one account can only its own variable cache.

    since you've only 1 busy website which is far far busy than others, you can have it run lsphp-5.3.27 and other still run lsphp-5.2.17 like before. the configuration actually easy -- refer https://www.litespeedtech.com/suppo...unning-multiple-versions-with-a-control-panel

    your lsphp-5.3.27 and lsphp-5.2.17 already built ready, so just need a few minutes(if familiar with it) to configure it, since only the busiest website run lsphp-5.3.27 suExec daemon mode, so apc variable cache can't be read by other accounts.
     
  3. semprot

    semprot Well-Known Member

    1. how to check whether lsphp is being used? any ssh command to do that?

    2. about xcache i will try it.

    3. about 5.3.27 & other 5.2.17 why other websites are set to use old version? to reduce memory usage? i use PHP 5.4 now.

    Thank you.
     
  4. NiteWave

    NiteWave Administrator

    run "top -c" or "pstree -p", you can see many lsphp5 process, it's the php handler.

    > 3. about 5.3.27 & other 5.2.17 why other websites are set to use old version? to reduce memory usage? i use PHP 5.4 now.
    it's to separate the busiest website(or account) with others, easier to manage. you can focus to tune lsphp-5.3.27 and be sure to affect only the busiest site and won't affect others. some old php script may only work with php-5.2.x.

    if php script compatible with php 5.4, that's good to switch to it.
     
  5. semprot

    semprot Well-Known Member

    Thank you this far i see no script error on some domains that use 5.4. So i'll stick with it. Current performance is good now.
     

Share This Page