(note: do not apply this patch on vBulletin 3.7 as it's included already)
This patch allow you to use XCache as a datastore cache in vBulletin. This is definitely your choice if you have installed and enabled XCache on you server already.
Take care that this is a beta version and was not heavily tested. And i'm not familiar with vBulletin source code as i just started reading it today, but i don't have any difficulty reading it thanks to my years of php skill
Take aware that some vB plugin is not compatible with vB_datastore_*, not just vB_datastore_XCache. So, in case you find vB_datastore_XCache won't work, you'd better try datastore to file or memcache. If one of the others works but not vB_datastore_XCache, do report it to me so i can fix it.
// vB_Datastore_Filecache - for using a cache file
// $config['Datastore']['class'] = 'vB_Datastore_Filecache';
$config['Datastore']['class'] = 'vB_Datastore_XCache';
// vB_Datastore_Memcached - for using a Memcache server
// It is also necessary to specify the hostname or IP address and the port the server is listening on
Trouble Shooting
q. i have multiple vBulletin instance installed, the seems to mix data after install this plugin
a. this applies to apc too because, if you wanna fix it, try
open class_core.php, look for:
$this->prefix =& $this->registry->config['Datastore']['prefix'];
and modify to:
$this->prefix = $this->registry->config['Datastore']['prefix'] . $_SERVER['SERVER_NAME']; // or HTTP_HOST
q. Warning: unserialize() expects parameter 1 to be string, array given in $a.php on line $b
a. upgrade your plugin/hack that $a.php belongs to, e.g. vbjournal/vbgallery etc. OR open $a.php and locate at line $b, remove unserialize call, e.g.:
replace $var = unserialize($this->data);
with $var = $this->data;
be careful do not remove the whole line, just the unseralize( and )
Ah... Bummer... vbGallery stops working when this is activated (just as with the memcache datastore). I wish they'd get around to fixing their code...
yup, i thought i can be vB_datastore_XCache plugin problem, but i copy the code from vB_datastore_APC, so it can also be problem of other plugin that isn't compatible with vB_datastore_*
I have a windows system w/ memcache enabled and the gallery working with the new changes. With the current code in the gallery APC, Memcached setting stop the gallery from working.
I will also change the code to build datastore.
New:
Code:
build_datastore('name',serialize($field),1);
Old:
Code:
build_datastore('name',serialize($field));
Changes as these may also fix other scripts out there.
Works like a charm. I was supposed to install this 7 days ago. But I was having weird connection problem . Thanks a lot m0o . Screenshot added to 1st page.
you'd better check if all your plugins works when vb_datastore is enabled (vb_datastore_xcache is only one of the datastores). may other vbulletin professional users give you advice