(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 )
hydn, is it possible for xcache and memcached to co-exist? If I have xcache installed as an oppcache, how should I install memcached?
Yes. It is. operation code and variable cache are two different things. If your database and web server are on the same box I would recommend you use xcache for opcode & datastore. If on separate boxes then use memcache for datastore of vb install on database server and xcache will run as usual on web server.
In IIS zend conflicted with xcache for me. If it works for you use it. But not necessary. If you do use it benchmark because i'm not sure it will make things faster with xcache.
xcache installed in the server and i applied all changes
still getting the error above
Quote:
Fatal error: Class vb_datastore_xcache: Cannot inherit from undefined class vb_datastore in /home/al7elwa/domains/al7elwa.com/public_html/board/includes/class_datastore_xcache.php on line 14
You don't need this plug-in in 3.7 because 3.7 already have this. You just have to enable it in your config.php under the ****** DATASTORE CACHE CONFIGURATION ***** option. Just type $config['Datastore']['class'] = 'vB_Datastore_XCache'; & save it.
You don't need this plug-in in 3.7 because 3.7 already have this. You just have to enable it in your config.php under the ****** DATASTORE CACHE CONFIGURATION ***** option. Just type $config['Datastore']['class'] = 'vB_Datastore_XCache'; & save it.