Vbulltin PHP Xcache Displaying Same Forum Data For Both Boards Error and Solution

in Categories , , , , , , , , , , , , last updated August 27, 2008

Q. I’ve followed your Xcache php 5.x opcode cacher installation under RHEL 5 for my vbulltin board. I see good boosting in performance. Now I’ve installed 2nd VB forum on the same server and I see all sub-forums hosted from 1st forum. So I had to disable Xcache. I want Xcache for both board on same host. How do I fix this mess?

A. Xcache caches both php files and variable. Since vbulltin is the same product, it will cache and use same variable within cache. This is performance boosting feature. However, you can force xcache , so that VB do not try to use the same variable within the cache by specific to use a prefix. Make sure following two line exists in your VB config.php file (located in /path/to/forum/includes/config.php):
# vi config.php
Append or modify settings as follows:
$config['Datastore']['class'] = 'vB_Datastore_XCache';
$config['Datastore']['prefix'] = 'yourforumname';

Save and close the file. Make sure you restart Apache:
# service httpd restart
# service lighttpd restart
This works in a similar manner to the database table prefix. This is also applicable to other PHP caching systems such as APC and eAccelerator with more than one set of boards installed on same UNIX / Linux / Windows host.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Share this on (or read 0 comments/add one below):