PHP 5.3.2 and xCache 1.3.0.

sux0r

Well-Known Member
#1
Hello,
I installed xcache today.
Did the php.ini edits.

But xcache doesnt show up on phpinfo.


When i run: /usr/local/lsws/fcgi-bin/lsphp5 -v
It does though.
Is there a way to know if xCache is working and enabled ??

PHP 5.3.2 (litespeed) (built: Jul 17 2010 13:56:17)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo
 

sux0r

Well-Known Member
#3


Here -

Code:
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 1
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 = On

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""
 

NiteWave

Administrator
#4
these setting looks normal.

list all lines starting with
zend_extension =
extension =
in php.ini.
note: in order of they appear in php.ini

another question: php in suExec mode or not?
 

sux0r

Well-Known Member
#5
Herez the zend_extention lines as they appear in order.
and found nothing with extension =

zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
zend_extension = "/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20090626/xcache.so"

Yes, php is in SuExec mode.
 

NiteWave

Administrator
#6
1.check if /usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20090626/xcache.so exists

2.decrease
xcache.size = 64M
xcache.var_size = 32M
to e.g.,
xcache.size = 4M
xcache.var_size = 2M

see if xcache appear in phpinfo()

3.php suExec in shared hosting, better to use eAccelerator.
 

sux0r

Well-Known Member
#7
Sorry about my last post. When i mentioned i've included the zend_extention:
My changes to php.ini were lost when i restarted litespeed.
I had to switch to apache, make changes to ini and then restart litespeed.

zend_extension = "/usr/local/IonCube/ioncube_loader_lin_5.3.so"
zend_extension = "/usr/local/lsws/lsphp5/lib/php/extensions/no-debug-non-zts-20090626/xcache.so"

This is the bit in the current php.ini file
And xCache shows in phpinfo
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd., and
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo

This is the xCache section in phpinfo.

Code:
Version 	1.3.0 
Modules Built 	cacher 
Readonly Protection 	N/A 
Cache Init Time 	1970-01-01 00:00:00 
Cache Instance Id 	0 
Opcode Cache 	disabled 
Variable Cache 	disabled 
Shared Memory Schemes 	mmap

xcache.admin.enable_auth	On	On
xcache.cacher	On	On
xcache.coredump_directory	no value	no value
xcache.count	1	1
xcache.gc_interval	0	0
xcache.mmap_path	/dev/zero	/dev/zero
xcache.readonly_protection	0	0
xcache.shm_scheme	mmap	mmap
xcache.size	0	0
xcache.slots	8K	8K
xcache.stat	On	On
xcache.test	0	0
xcache.ttl	0	0
xcache.var_count	1	1
xcache.var_gc_interval	120	120
xcache.var_maxttl	0	0
xcache.var_size	0	0
xcache.var_slots	8K	8K
xcache.var_ttl	0	0
But the xcache section in the phpinfo page doesnt make the changes i've made in the php.ini o_O
in phpinfo it shws xcache size as 0.

EDIT: Should i disable SuExec ??

 

cmanns

Well-Known Member
#9
I switched to eAccelerator. :)
eAccelerator sucks :D

You have a misconfiguration, can you post your php.ini somewhere?

Use php-cgi -m / etc to check why it's not loading the .so

I often compile XCache statically into PHP and Memcache, you can do it with the litespeed gui setup in cpanel plugin, before you run the ssh command and you must put the enable options for memcache/xcache.

Seemed to run a tad quicker :rolleyes:

We use 64MB of mem opcode cache, 128MB var cache. Ram and load is extremely low, php rarely uses more then 5-10% per request (Sometimes hits 50%+ randomly, probably not cached) however, without XCache php uses 30-50% avg per process, would eat 200%+ cpu, instead less then 50%.

I've used XCache over 3+ years, I've tried APC/EA, XCache = superior. Just like Litespeed is superior to apache + mod_fcgid.
 

meto

Well-Known Member
#10
Do you use it with suExec? I'm also fan of xCache but I'm new to LiteSpeed... In non-suExec environment it works just excelent, as usual.
 
Top