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.

Xcache not working

Discussion in 'EasyApache' started by Peter Ivanov, Sep 26, 2015.

  1. Peter Ivanov

    Peter Ivanov Registered

    Joined:
    Sep 20, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    Hello, i installed Xcache via Easyapache, but i cant get it to work

    prntscr.com/8ktv2u


    I also modified the php.ini with various examples from google, but still it does not work

    Here is my php.ini file
    Code:
    
    [xcache]
    ; ini only settings, all the values here is default unless explained
    
    
    
    xcache.shm_scheme =        "mmap"
    xcache.size  =              128M
    ; set to cpu count (cat /proc/cpuinfo |grep -c processor)
    xcache.count =                 2
    xcache.slots =                8K
    xcache.ttl   =              3600
    xcache.gc_interval =        3600
    
    xcache.var_size =            64M
    xcache.var_count =             2
    xcache.var_slots =            8K
    ; default ttl
    xcache.var_ttl   =          3600
    xcache.var_maxttl   =     360000
    xcache.var_gc_interval =    1800
    
    
    xcache.var_count="1"
    xcache.var_gc_interval="300"
    xcache.var_maxttl="0"
    xcache.var_size="4M"
    xcache.var_slots="8K"
    
    ; for *nix, xcache.mmap_path is a file path, not directory.
    ; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
    ; 2 group of php won't share the same /tmp/xcache
    ; for win32, xcache.mmap_path=anonymous map name, not file path
    xcache.mmap_path =    "/dev/zero"
    
    
    
    ; leave it blank(disabled) or "/tmp/phpcore/"
    ; make sure it's writable by php (without checking open_basedir)
    ;xcache.coredump_directory =   ""
    
    ; per request settings
    xcache.cacher =               On
    xcache.stat   =               On
    xcache.optimizer =            On
    
    xcache.test =                Off
    ; N/A for /dev/zero
    xcache.readonly_protection = Off
    
    
    
    

    And here is the test script i am using

    Code:
    <?php
    
    $count = xcache_get("count");
    var_dump($count);
    $count++;
    xcache_set("count", $count,600);
    
    ?>
    
    The problem is that xCache does not preserve the values and $count us always NULL




    Does this have something to do with SUPHP or suEXEC?

    My current PHP 5 Handler is suphp

    PHP version is 5.6.13

    Also on a CMS install when i try to use xCache i get the following error in /usr/local/apache/logs/error_log

    Code:
    
    [Sat Sep 26 21:22:11.522666 2015] [core:error] [pid 47641] [client 212.75.18.168:59056] End of script output before headers: index
    .php
    [Sat Sep 26 21:38:30.865401 2015] [core:error] [pid 47644] [client 212.75.18.168:62790] End of script output before headers: index
    .php
    
    
     
    #1 Peter Ivanov, Sep 26, 2015
    Last edited by a moderator: Sep 26, 2015
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    Xcache will not run with SuPHP
     
  3. Peter Ivanov

    Peter Ivanov Registered

    Joined:
    Sep 20, 2015
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    Thank you for the clarification.

    At the end i switched to memcached following this tutorial crybit.com/easy-way-to-install-memcached-and-memcache-in-a-cpanel-server/
     
    #3 Peter Ivanov, Sep 27, 2015
    Last edited by a moderator: May 23, 2016
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page