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 For PHP 5.1.6, Anyone?

Discussion in 'cPanel Developers' started by brendanrtg, Jan 27, 2007.

  1. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Have anyone tried installing xcache (http://trac.lighttpd.net/xcache) onto their Centos box that has Zend 3.2.0 on it?

    The installation is easy but we simply cant get apache to startup returning "broken config".

    Anyone?
     
  2. Nhojohl

    Nhojohl Well-Known Member

    Joined:
    Nov 28, 2006
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    I just did it with PHP 5.2.0 and it worked...CentOS 4.4 and Zend 3.2 - I had to run it as a zend extension. Running as a normal php extension kept giving me the "Apache blah blah blah, ignoring restart."

    I got the xCache info thing to pop up in PHP Info once but after restarting apache it disappeared. It still says it at the top of phpinfo...

    Code:
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
        with XCache v1.2.0, Copyright (c) 2005-2006, by mOo
        with the ionCube PHP Loader v3.1.28, Copyright (c) 2002-2007, by ionCube Ltd., and
        with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend Technologies
        with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend Technologies
    In php.ini i have everything for xCache at the bottom:

    Code:
    zend_extension=/usr/local/lib/php/extensions/xcache.so
    xcache.admin.user = "root"
    xcache.admin.pass = ""
    xcache.shm_scheme = "mmap"
    xcache.size = 32M
    xcache.count = 2
    xcache.slots = 8K
    xcache.ttl = 0
    xcache.gc_interval = 0
    xcache.var_size = 32M
    xcache.var_count = 2
    xcache.var_slots = 8K
    xcache.var_ttl = 0
    xcache.var_maxttl = 0
    xcache.var_gc_interval = 300
    xcache.test = Off
    xcache.readonly_protection = Off
    xcache.mmap_path = "/dev/zero"
    xcache.coredump_directory = ""
    xcache.cacher = On
    xcache.stat = On
    xcache.optimizer = Off
    xcache.coverager = Off
    xcache.coveragedump_directory = ""
    zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.2.so
    zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.2.2
    zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.2.2
    zend_optimizer.version=3.2.2
    
    zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
    zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
    From what I can tell it is working, the pages are loading wicked fast and the server load has dropped dramatically.
     
    #2 Nhojohl, Jan 29, 2007
    Last edited: Jan 29, 2007
  3. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Just curious, have you tried Eaccelerator recently under the same conditions? I am wondering how you compare the two.
     
  4. Nhojohl

    Nhojohl Well-Known Member

    Joined:
    Nov 28, 2006
    Messages:
    101
    Likes Received:
    0
    Trophy Points:
    16
    I've tried eAccelerator and it worked fine, was installed correctly and everything. To me the loading difference between eAccelerator and nothing and xCache and nothing is clearly visable.

    The difference between xCache and eAccelerater are probably very very small and not noticable...

    You could try using the apache benchmark tool, that might help some..
    http://httpd.apache.org/docs/1.3/programs/ab.html
     
  5. Karabaja

    Karabaja Active Member

    Joined:
    Mar 3, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I have php 5.2 and zend optimizer 3.2.2 but this is what I get when I try loading xcache as zend extension:

    "XCache requires Zend Engine API version 220051025.
    The Zend Engine API version 220060519 which is installed, is newer.
    Contact mOo at http://xcache.lighttpd.net for a later version of XCache."

    I tried with xcache 1.2.0 so I guess there is no newer version to download.
    If I add it as php extension in php.ini apache doesn't log any errors but it doesn't load xcache either.

    Any help would be much appreciated.
     
  6. Karabaja

    Karabaja Active Member

    Joined:
    Mar 3, 2006
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Actually I just tried going back to eaccelerator and got same error:

    Code:
    eAccelerator requires Zend Engine API version 220051025.
    The Zend Engine API version 220060519 which is installed, is newer.
    Contact eAccelerator at http://eaccelerator.net for a later version of eAccelerator.
    So it seems to be something with zend. But I have no idea how to fix it.
     
  7. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16

    From your attachments, I see ZEND being AFTER xcache and we did that as well, the only option for it to not crash apache at start. However, after runnig a while, Apache crashes again.

    Did you install xcache and then Zend?
     
  8. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16

    We had the same problem and what we did was to load xcache BEFORE Zend itself. Refer to my above post.
     
  9. Nneel

    Nneel Registered

    Joined:
    Feb 22, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    we are on php5.2.0

    with zend u can never make it working..

    without Zend its working really fine
     
  10. brendanrtg

    brendanrtg Well-Known Member

    Joined:
    Oct 4, 2006
    Messages:
    311
    Likes Received:
    0
    Trophy Points:
    16
    Although Zend says its compatible, but with Zend, xcache will NEVER work no matter how hard we tweak the config and settings.

    We got it to start but it crashes apache a few minutes later.

    Anyone?
     
  11. summy

    summy Active Member

    Joined:
    Jan 14, 2004
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    We have the same problem.

    Apache 1.3.37, PHP 5.2.1, Zend 3.2.2, Xcache 1.2.0 (and tried 1.2.1-devel).

    The above just wouldn't work, as a module or zend extension, tried all the tricks (xcache first etc), but no joy. I have read that Zend 3.2.2 is not compatible with the current version of xcache.

    We finally gave up using Zend and just enabled xcache, anyway after a few hours it seems that apache/php keeps crashing. Not good, so we sacked xcache off and used APC instead, so far so good. This is on a very high traffic website.
     
  12. roccoroxn

    roccoroxn Registered

    Joined:
    Mar 30, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1

    look here: http://itst.net/wp-content/uploads/2006/10/PHP%20Bytecode%20Cacher%20Review.html
     
Loading...

Share This Page