Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
datastore cache to XCache - boost your vBulletin Details »»
datastore cache to XCache - boost your vBulletin
Version: 0.8.5, by phpxcache phpxcache is offline
Developer Last Online: Mar 2008 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.6.5 Rating:
Released: 03-02-2007 Last Update: 03-03-2007 Installs: 142
Code Changes Additional Files  
No support by the author.


(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.

Pre-requirement
Install the modification
for those of you who can't run "patch", u may patch the file manually
  • download Attachment 61372 (class_datastore_xcache.php)
  • save the file as vBulletin.3.6/upload/includes/class_datastore_xcache.php
  • open vBulletin.3.6/upload/includes/class_datastore.php in your favor editor
  • add a line in class_datastore.php (see below)
  • update upload/includes/config.php to enable it (see below)

example class_datastore.php after modification:
PHP Code:
        }
        return 
true;
    }
}

// add class_datastore_xcache, enable it in config.php
require_once(DIR '/includes/class_datastore_xcache.php');

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 12:33, Fri Mar 2nd 2007
|| # CVS: $RCSfile$ - $Revision: 15474 $
|| ####################################################################
\*======================================================================*/ 
example config.php after modification:
PHP Code:

    
// 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 )

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #192  
Old 12-30-2007, 09:57 AM
SeV3n SeV3n is offline
 
Join Date: Jan 2004
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by phpxcache View Post
and yes, i am.
Great to hear
OT: Anyway I've just added you on MSN (i opened Ticket #158).
Reply With Quote
  #193  
Old 01-09-2008, 11:09 PM
Ata123 Ata123 is offline
 
Join Date: Jul 2007
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by da420 View Post
I applied the patch, and all I get is a blank page when accessing the forum.
I got a blank page, too, and no php error messages.

Removing blank lines at the bottom of class_datastore_xcache.php (any blank lines after ?> ) fixed it for me
Reply With Quote
  #194  
Old 01-10-2008, 11:56 AM
netwind netwind is offline
 
Join Date: Feb 2005
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this hack must share variable $forumcache ?
I install all software. Checking xcache admin : variable 'forumcache' eats 1.8Mb.
ok but where is memory ?
Here debug from vbulletin :

Time Before: 0.00148 seconds
Time After: 0.00185 seconds
Time Taken: 0.00037 seconds

Memory Before: 196.090 KB
Memory After: 197.766 KB
Memory Used: 1.676 KB
Datastore Setup

Time Before: 0.00201 seconds
Time After: 0.04075 seconds
Time Taken: 0.03874 seconds

Memory Before: 197.926 KB
Memory After: 7,868.695 KB
Memory Used: 7,670.770 KB

is it normal ?
Reply With Quote
  #195  
Old 01-13-2008, 06:20 PM
poprulz poprulz is offline
 
Join Date: Oct 2005
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Disable other extension and see

;zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
;zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

Save and restart httpd, check php.info and see xcache is installed.


Quote:
Originally Posted by Tralala80 View Post
Can someone post a working php.ini (the xcache part) ?

I continuously get the following error:
Fatal error: XCache not installed in /includes/class_datastore_xcache.php on line 34

Link to phpInfo:
http://74.86.70.196/phpinfo.php

Here's my php.ini xCache part:

Code:
[Zend]
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so

[xcache-common]
;; install as zend extension (recommended)
 zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;; install as zend extension with thread-safe
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
;; install as PHP extension (extension_dir must be set to the full path to xcache.so)
; extension = xcache.so

[xcache.admin]
xcache.admin.user = "Trajcek"
xcache.admin.pass = md5($mymd5ishere)

[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 16M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 0
xcache.gc_interval = 0

xcache.var_size = 2M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300

xcache.test = Off
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.coredump_directory = ""
xcache.cacher = On
xcache.stat = On
xcache.optimizer = Off

[xcache.coverager]
xcache.coverager = Off
xcache.coveragedump_directory = ""

There are some cases too when apache fails to start
Reply With Quote
  #196  
Old 01-20-2008, 04:12 AM
PING1434a PING1434a is offline
 
Join Date: Jun 2005
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, Just wondering
Any way to get around these errors?
Code:
Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85

Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 123

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 123

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124

Warning: xcache_unset() [function.xcache-unset]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 123

Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 124
I'm getting that everypage even with plug-in system turned off at moment.
Reply With Quote
  #197  
Old 01-20-2008, 05:51 AM
phpxcache phpxcache is offline
 
Join Date: Feb 2007
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PING1434a View Post
Hi, Just wondering
Any way to get around these errors?
Code:
Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /includes/class_datastore_xcache.php on line 85
I'm getting that everypage even with plug-in system turned off at moment.
check your phpinfo() page and see if XCache gets loaded and set properly, make sure you've updated the correct php.ini
Reply With Quote
  #198  
Old 01-25-2008, 04:27 AM
TheMilkCarton TheMilkCarton is offline
 
Join Date: Jan 2007
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are there ways to make MORE use of the datastore with vBulletin? Only 24 things are caching in Xcache and they're barely taking any space... I'd just like to make more use of my var cache.
Reply With Quote
  #199  
Old 02-02-2008, 04:51 AM
Zia's Avatar
Zia Zia is offline
 
Join Date: Dec 2005
Location: golpo.net
Posts: 931
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheMilkCarton View Post
Are there ways to make MORE use of the datastore with vBulletin? Only 24 things are caching in Xcache and they're barely taking any space... I'd just like to make more use of my var cache.
Try
https://vborg.vbsupport.ru/showthrea...ghlight=xcache by Lendy

this mod use varcache
(discission is urs use it or not)
Reply With Quote
  #200  
Old 02-13-2008, 10:25 PM
doraj doraj is offline
 
Join Date: Nov 2005
Location: Italy
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello

An information please...I use vBSeo 3.1

In Control Panel vBSeo there is : Caching Options

Cache Type (BETA)
Select the caching system to use from the list below. Make sure that your server supports the selected cache type.
  • memcached
  • APC Cache
  • XCache
  • eAccelerator
If I active XCache here (for vBSeo options), Can I also install and active Datastore Cache to config.php or not?
Two activations can create some conflicts?

Thanks
Reply With Quote
  #201  
Old 02-14-2008, 09:33 AM
dtv100 dtv100 is offline
 
Join Date: Apr 2007
Location: in the south of the north
Posts: 307
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK when bar look really low mean is time to clear or to add more than 64mb to settings?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05776 seconds
  • Memory Usage 2,335KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete