How to change xcache settings

airaid

Member
Feb 18, 2014
23
1
3
cPanel Access Level
Root Administrator
Although familiar with WHM I've only recently started using it as root to setup my own tailored hosting environment. I'm using EasyApache with ruid2 and DSO with xcache. By default xcache uses an xcache.size of 0 and an xcache.var_size of 0 which disables caching. Outputting phpinfo() shows this to be the case i.e. that xcache is enabled but the size is set to 0. I'm stuck because:

  • xcache has no interface (by default) to edit these settings.
  • My understanding is you can't (or at least shouldn't) manually edit the global php.ini to change the settings because the file is overwritten when PHP settings are updated in WHM.
  • php_flags in the .htaccess files work for other php directives but not xcache.

This is the most detailed official post I found relating to setting up xcache but it mainly concerns setting up the admin interface for xcache which I'd rather avoid at this stage. It does however say "Customers typically setup Xcache once and then move on to other items" but doesn't mention how to actually set it up.

So I can't figure out how to change the xcache size setting to enable the cache and I'm most curious about why the xcache php_flags don't work.

There must be people using xcache with cPanel so if anyone can advise I'd appreciate it.

Many thanks

Gareth
 

ScottTh

Well-Known Member
Jan 28, 2013
157
2
18
Houston, TX
cPanel Access Level
Root Administrator
Hi Gareth,

I can point you to XCache's internal documentation that gives some more detailed explanations of how edit XCache for your particular needs.

I found this documentation that explains the various changes an admin can make to XCache. It looks like it might be what you're looking for.

I hope this helps and good luck!
 

airaid

Member
Feb 18, 2014
23
1
3
cPanel Access Level
Root Administrator
Thanks Scott, appreciate the reply.

It looks like the directives in the xcache.ini are being overridden by the directives in the php.ini - the xcache ini file sets a positive value for size where as the php ini sets it to 0. I think the only way is to manually edit the php.ini which I guess is ok as long as you remember to update it when it's overwritten.

I've switched to eAccellerator for now and used php.ini to up the memory. All seems fine so far.

Thanks again.