You are here
Andrew - Tue, 2011/09/13 - 05:37
I see the Wordpress appliance includes Xcache. That's great, but I'm struggling to get it working.
From what I can gather, I need to enter a username and password in the xcache.ini file (in /etc/php5/conf.d folder), but I'm not sure where to get those details from.
Can anyone point me in the right direction please?
Forum:
It should be working automatically
XCache should already be working. Look for an XCache section in phpinfo to see if it is. As long as xcache.size is not set to zero in /etc/php5/conf.d/xcache.ini then it should be working.
The username and password are used for "administration" but that administration is not actually required for xcache to work. If you do want to install the administration part of xcache you can follow the instructions found here.
Thanks Jeremiah
According to phpinfo, I have 16M available to xcache (so it should be working) but I keep getting server errors when I try to use it for opcode caching within the W3 Total Cache plugin.
Any idea why this might be or any suggestions for diagnosing the problem?
Sorry, but no I don't have any other ideas offhand
Sorry, but no I don't have any other ideas offhand. Do the errors point to anything in particular?
I've checked the error log
It sounds like the wordpress
It sounds like the wordpress plugin calls the xcache_clear_cache() function which is requiring the xcache admin username and password to be set. Follow the instructions in section 1.2 Generating your auth password. Basically you just need to encrypt your password and then put the username and password either in the /etc/php5/conf.d/xcache.ini or your php.ini file and restart apache. I'm not sure but you may need to enter the username and password somewhere in the w3-total-cache plugin interface as well.
To encrypt your password you can create a temporary file on your webserver called test.php with the following contents.
Then from your webserver's command line just run the following command and you should see the encrypted form of your password which you'll put in either of the .ini files mentioned above.
Easy way to get an MD5 password
echo -n "password-here" | md5sum
Much easier and safer
Solved!
<?php echo md5("password"); ?>
One thing I'm not sure about is how to change the username. I only discovered "admin" worked by trial and error, so I'm sure some extra guidance would be appreciated on that point.
You're welcome Phil
Actually, I'm using APC instead now, but I'm glad my findings helped you.
How to Swap to APC? How to tell what is running.
A while back I tried switching Magento to APC from XCache but was not able to get it done.. There are some postings a while back on the subject.
What is the basic process from going from one to the other?
Are there any constraints in TKL that complicate this?
I don't know about Magento
I don't know about Magento but, in WordPress at least, if APC is running on the server, then it should show up as an option in your caching plugin interface (e.g. in W3 Total Cache).
I don't think APC is included in the TKL appliance as standard, so you'd need to manually install it in a terminal session.
I'm not sure exactly how to do that as I've actually moved to an Nginx-based server that I had specially built for me (that includes APC).
If I were you, I'd probably just stick with XCache if it's working OK as, as far as I know, APC isn't significantly better.
But if you're looking to improve performance, moving to Nginx makes a huge difference.
Add new comment