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.

Using XCache (or other PHP Accelerator)

Discussion in 'CloudLinux' started by Avalon, May 1, 2015.

  1. Avalon

    Avalon Member

    Joined:
    Apr 27, 2015
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    United States
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    We have been attempting to install XCache onto CloudLinux servers and have been running into one rather annoying problem: using EasyApache3 to compile XCache into the code results in XCache being displaying in phpinfo for any account on the system but its OpCode Cache is disabled and pretty much any settings changed from /usr/local/lib/php.ini doesn't appear to have an effect on any of the accounts on the server even though they are all currently using the system default PHP (although PHP Selector is installed).

    I found this thread: https://forums.cpanel.net/threads/opcache-config-problem.427662/ which indicates that CloudLinux "ignores" the global configuration for Zen Optimizer and that you have to add the settings to each of the PHP versions.

    Does one have to do the same with XCache? Having tried to enable XCache, Memcache, and EAccelerator has resulted in the same thing: none of the server accounts are able to use those caching mechanisms and in the case of Memcache the accounts can't even see it.

    The system is using PHP 5.5 with FCGI and suEXEC as the default settings.

    Right now EasyApache 3 has XCache compiled and Memcache compiled. Preferably, I would like to allow both available to accounts since some applications only work with Memcache while others work with any accelerator that you can name.
     
  2. Avalon

    Avalon Member

    Joined:
    Apr 27, 2015
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    United States
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I also want to add that the XCache settings (pulled from phpinfo) doesn't even match the settings in php.ini:

    Code:
    XCache Cacher Module enabled
    Readonly Protection disabled
    Page Request Time 2015-05-02 05:53:11
    Cache Init Time 1970-01-01 00:00:00
    Cache Instance Id 0
    Opcode Cache disabled
    Variable Cache disabled
    Shared Memory Schemes mmap
    
    Directive Local Value Master Value
    xcache.admin.enable_auth On On
    xcache.allocator bestfit bestfit
    xcache.cacher On On
    xcache.count 1 1
    xcache.gc_interval 0 0
    xcache.mmap_path /dev/zero /dev/zero
    xcache.readonly_protection Off Off
    xcache.shm_scheme mmap mmap
    xcache.size 0 0
    xcache.slots 8K 8K
    xcache.stat On On
    xcache.ttl 0 0
    xcache.var_allocator bestfit bestfit
    xcache.var_count 1 1
    xcache.var_gc_interval 300 300
    xcache.var_maxttl 0 0
    xcache.var_namespace no value no value
    xcache.var_namespace_mode 0 0
    xcache.var_size 0 0
    xcache.var_slots 8K 8K
    xcache.var_ttl 0 0
    
    And this is what's currently in php.ini pertaining th xcache:

    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20121212"
    zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.5.so"
    extension = "xcache.so"
    extension = "pdo.so"
    extension = "pdo_sqlite.so"
    extension = "pdo_mysql.so"
    extension = "memcache.so"
    extension = "ixed.5.5.lin"
    xcache.admin.enable_auth="on"
    xcache.admin.pass=""
    xcache.admin.user="mOo"
    xcache.cacher="On"
    xcache.coredump_directory=""
    xcache.count="1"
    xcache.coveragedump_directory="/tmp/pcov/"
    xcache.coverager="Off"
    xcache.gc_interval="0"
    xcache.mmap_path="/dev/zero"
    xcache.optimizer="Off"
    xcache.readonly_protection="Off"
    xcache.size="512M"
    xcache.slots="8K"
    xcache.test="Off"
    xcache.ttl="0"
    xcache.var_count="1"
    xcache.var_gc_interval="300"
    xcache.var_maxttl="0"
    xcache.var_size="0"
    xcache.var_slots="8K"
    xcache.var_ttl="0"
    
    
     
    #2 Avalon, May 2, 2015
    Last edited by a moderator: May 2, 2015
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Please let us know if this thread is helpful:

    https://forums.cpanel.net/threads/opcache-config-problem.427662/

    Thank you.
     
  4. Avalon

    Avalon Member

    Joined:
    Apr 27, 2015
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    United States
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    I actually had to reach out to CloudLinux because SoftLayer wasn't sure what was going on either and CloudLinux was able to rectify the problem. It turned out to be something simple actually that just needs to be run anytime one wants to make global changes to a CloudLinux based server:

    Code:
    # cagefsctl --force-update
    # cagefsctl --remount-all
    They also told me CloudLinux's CageFS syncs with the global config every day and that it can be changed by running:

    Code:
    # cagefsctl --set-update-period
    However, once a day is more than enough now that we know how to force CageFS to sync settings on the fly.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page