#1 (permalink)  
Old 05-11-2009, 01:22 PM
Registered User
 
Join Date: Nov 2006
Posts: 296
Zion Ahead is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-11-2009, 06:56 PM
Registered User
 
Join Date: Jun 2003
Posts: 26
StingRay2k01
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"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-18-2009, 01:41 PM
Registered User
 
Join Date: Dec 2004
Posts: 360
forlinuxsupport is on a distinguished road
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.
__________________
www.Forlinux.co.uk
-------------------------------
Linux and Open Source Solutions and Support
Emergency Support
Web Servers / Email Support / Cluster Solutions
Cpanel Servers and support for WHM / CPANEL
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc