Results 1 to 3 of 3

Thread: xcache problem, segmentation fault

  1. #1
    Registered Member
    Join Date
    Nov 2006
    Posts
    347

    Exclamation xcache problem, segmentation fault

    Trying to enable xcache on my cpanel, centos server (suphp *not* enabled)

    Followed this guideline
    http://www.eth0.us/xcache

    Xcache shows up in php -m output, however I get this output as well
    Code:
    root@server [/tmp]# php -v
    PHP 5.2.8 (cli) (built: Jan  5 2009 16:23:03)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
        with the ionCube PHP Loader v3.1.34, Copyright (c) 2002-2009, by ionCube Ltd., and
        with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
        with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
    Segmentation fault (core dumped)
    In the /usr/local/lib/php.ini file I had this portion setup before the Zend portion...
    Code:
    [xcache-common]
    
    extension = xcache.so
    
    [xcache.admin]
    xcache.admin.auth = On
    xcache.admin.user = ""
    xcache.admin.pass = ""
    
    [xcache]
    ; ini only settings, all the values here is default unless explained
    
    ; select low level shm/allocator scheme implemenation
    xcache.shm_scheme = "mmap"
    
    ; to disable: xcache.size=0
    ; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
    xcache.size = 128M
    
    ; set to cpu count (cat /proc/cpuinfo |grep -c processor)
    xcache.count = 4
    
    ; just a hash hints, you can always store count(items) > slots
    xcache.slots = 8K
    
    ; ttl of the cache item, 0=forever
    xcache.ttl = 0
    
    ; interval of gc scanning expired items, 0=no scan, other values is in seconds
    xcache.gc_interval = 0
    
    ; same as aboves but for variable cache
    xcache.var_size = 0M
    xcache.var_count = 1
    xcache.var_slots = 8K
    ; default ttl
    xcache.var_ttl = 0
    xcache.var_maxttl = 0
    xcache.var_gc_interval = 300
    
    xcache.test = Off
    ; N/A for /dev/zero
    xcache.readonly_protection = Off
    ; 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 = Off
    
    [xcache.coverager]
    ; per request settings
    ; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
    xcache.coverager = Off
    
    ; ini only settings
    ; make sure it's readable (care open_basedir) by coverage viewer script
    ; requires xcache.coverager=On
    xcache.coveragedump_directory = ""
    
    [Zend]
    
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
    zend_optimizer.version=3.3.3
    
    extension=pdo.so
    extension=pdo_sqlite.so
    extension=sqlite.so
    extension=pdo_mysql.so
    
    allow_url_include = On
    
    ; Memcache Section
    extension = memcache.so
    memcache.allow_failover = 0
    When I search for "zend_extension" this is the result:
    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
    zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"
    zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_5.2_ts.so"
    ;zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so"
    If I move the xcache line to the first line, before the ioncube one, I get this error:

    root@server [/usr/local/lib/php/extensions/no-debug-non-zts-20060613]# php -m
    Segmentation fault (core dumped)

    Code:
    root@server [/usr/local/lib/php/extensions/no-debug-non-zts-20060613]# ls -lh
    total 290M
    drwxr-xr-x 2 root root 4.0K May 11 11:48 ./
    drwxr-xr-x 5 root root 4.0K Sep 17 2007 ../
    -rw------- 1 root root 144M May 11 11:48 core.9588
    -rw------- 1 root root 144M May 11 11:48 core.9592
    -rwxr-xr-x 1 root root 495K Jan 5 16:34 eaccelerator.so*
    -rw-r--r-- 1 root root 3.1K Jan 5 22:04 error_log
    -rwxr-xr-x 1 root root 142K Sep 17 2007 mailparse.so*
    -rwxr-xr-x 1 root root 313K Jan 5 20:43 memcache.so*
    -rwxr-xr-x 1 root root 124K Jan 5 16:23 pdo_mysql.so*
    -rwxr-xr-x 1 root root 265K Jan 5 16:23 pdo.so*
    -rwxr-xr-x 1 root root 1.4M Jan 5 16:23 pdo_sqlite.so*
    -rwxr-xr-x 1 root root 989K Jan 5 16:23 sqlite.so*
    -rwxr-xr-x 1 root root 323K May 11 11:31 xcache.so*
    My config:

    PHP 5.2.8
    Zend Opt 3.3.3
    suphp disabled
    Apache 2.2

  2. #2
    Registered Member
    Join Date
    Jun 2003
    Posts
    30

    Default

    You didn't mention the MPM type of Apache, is it Prefork or Worker?
    PHP is run with mod_php then?


    Either way, make sure zend stuff comes last. I notice a few others there that come after your zend statements too, try moving them before zend.

    If you are using prefork, then your line should look like.
    zend_extension = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so"

    For example here's mine, but it's using Worker MPM, so it's threaded.

    [Zend]
    zend_extension_ts = "/usr/local/lib/php/extensions/no-debug-zts-20060613/xcache.so"
    zend_extension_ts = "/usr/local/Zend/lib/ZendExtensionManager_TS.so"
    zend_extension_manager.optimizer = "/usr/local/Zend/lib/Optimizer-3.3.3"
    zend_extension_manager.optimizer_ts = "/usr/local/Zend/lib/Optimizer_TS-3.3.3"
    zend_optimizer.version = "3.3.3"
    zend_extension = "/usr/local/Zend/lib/ZendExtensionManager.so"

  3. #3
    Registered Member cPanel Partner NOC Badge
    Join Date
    Dec 2004
    Posts
    391
    cPanel/WHM Access Level

    Root Administrator

    Default try this

    look here - #200 (Compatability issue with ZendOptimizer) – XCache

    You have to list xcache higher up than zend stuff in php.ini

    just make sure all lines starting zend are below xcache..

    see if that works now.
    UK Managed Hosting and Linux support
    The information given above is intended to be advice only.

Similar Threads

  1. Replies: 1
    Last Post: 05-24-2010, 12:11 PM
  2. Segmentation fault
    By controller in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 12-26-2006, 10:01 AM
  3. Segmentation fault help
    By DvDWSL in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 04-02-2004, 12:56 PM
  4. ls segmentation fault
    By mitul in forum cPanel & WHM Discussions
    Replies: 38
    Last Post: 02-23-2004, 02:18 PM
  5. Segmentation fault...
    By hyrum in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 11-20-2003, 07:17 AM
bargain