Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2016, 09:26 AM
postcd postcd is offline
 
Join Date: Feb 2012
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Memcache may not work, how to configure config.php for memcache?

Hello,

my caching plugin vB Optimize says this when runing test:

Quote:
Running Test: Fetch Cache
" Your Opcache Operator extension is functioning, however it is unable to store data. Please check your extension configuration."
The operator is set to Memcache.

And this is from phpinfo:

Quote:
memcache support enabled
Active persistent connections 0
Version 2.2.7
Revision $Revision: 327750 $

Directive Local Value Master Value
memcache.allow_failover 1 1
memcache.chunk_size 8192 8192
memcache.default_port 11211 11211
memcache.default_timeout_ms 1000 1000
memcache.hash_function crc32 crc32
memcache.hash_strategy standard standard
memcache.max_failover_attempts 20 20
This is from vbulletin config.php

Quote:
/*
$config['Datastore']['class'] = 'vB_Datastore_Memcached';
$i = 0;
// First Server
$i++;
$config['Misc']['memcacheserver'][$i] = '127.0.0.1';
$config['Misc']['memcacheport'][$i] = 11211;
$config['Misc']['memcachepersistent'][$i] = true;
$config['Misc']['memcacheweight'][$i] = 1;
$config['Misc']['memcachetimeout'][$i] = 1;
$config['Misc']['memcacheretry_interval'][$i] = 15;
*/

i wanted to ask what steps to do to fix this? Thank you
Reply With Quote
  #2  
Old 01-18-2016, 02:26 PM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by postcd View Post
This is from vbulletin config.php
That section is commented out. Remove the /* at the start and */ at the end to uncomment it.
Reply With Quote
  #3  
Old 01-18-2016, 02:32 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you independently verified that memcache is in fact not working?

Run the following script twice to confirm memcache's functionality:

PHP Code:
<?php
$mem 
= new Memcached();
$mem->addServer("127.0.0.1"11211);

$result $mem->get("blah");

if (
$result) {
    echo 
$result;
} else {
    echo 
"No matching key found.  I'll add that now!";
    
$mem->set("blah""I am data!  I am held in memcached!") or die("Couldn't save anything to memcached...");
}
?>
Reply With Quote
  #4  
Old 01-18-2016, 04:19 PM
postcd postcd is offline
 
Join Date: Feb 2012
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I uncommented that and "Fetch cache" worked, BUT "Flush cache" not with error:

"Your Opcache Operator extension is unable to flush variables. Please check your extension configuration."

i tried running squidsk script and it says:
"Fatal error: Class 'Memcached' not found in /home/username/public_html/i.php on line 2"

On line 2 when i change Memcached to Memcache, it says:
"No matching key found. I'll add that now!"
nothing else

any idea please? :-(
Reply With Quote
  #5  
Old 01-18-2016, 04:32 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Memcached is not the same as Memcache. They are different modules.
Reply With Quote
  #6  
Old 01-18-2016, 07:23 PM
postcd postcd is offline
 
Join Date: Feb 2012
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave View Post
Memcached is not the same as Memcache. They are different modules.
I know, and how it solves the issue, i dont understand. Im using memcache i believe.
Reply With Quote
  #7  
Old 01-19-2016, 03:11 AM
webmastersun's Avatar
webmastersun webmastersun is offline
 
Join Date: Oct 2013
Location: www.webmastersun.com
Posts: 433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you set memcached port and enable it on your server after installed?
Reply With Quote
  #8  
Old 01-19-2016, 08:48 AM
postcd postcd is offline
 
Join Date: Feb 2012
Posts: 319
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webmastersun View Post
Have you set memcached port and enable it on your server after installed?
# service memcached status
Quote:
memcached (pid 1200) is running...
# cat /etc/init.d/memcached | grep =
Quote:
PORT=11211
USER=memcached
MAXCONN=1024
CACHESIZE=256
OPTIONS=""
if [ "$NETWORKING" = "no" ]
RETVAL=0
prog="memcached"
pidfile=${PIDFILE-/var/run/memcached/memcached.pid}
lockfile=${LOCKFILE-/var/lock/subsys/memcached}
if [ "`stat -c %U /var/run/memcached`" != "$USER" ]; then
RETVAL=$?
RETVAL=$?
RETVAL=$?
RETVAL=2
# cat /etc/csf/csf.conf | grep 11211
nothing

csf.conf is firewall CSF configuration file, so i added 11211 to the TCP_IN and TCP_OUT (good step or not necessary?), restarted firewall "csf -r"

and then tried testing php script provided above by member "Dragonsys"

It returned error on line 2 again, but when changed Memcached to Memcache (is it correct didnt i break script testing purpose?), it says: "I am data! I am held in memcached!"

my vbulletin vB Optimize addon stil said:
"Your Opcache Operator extension is functioning, however it is unable to store data. Please check your extension configuration."

(i set memcache as operator in that plugin)
:-(

--------------- Added [DATE]1453243211[/DATE] at [TIME]1453243211[/TIME] ---------------

im back with "Your Opcache Operator extension is unable to flush variables." error
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:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05018 seconds
  • Memory Usage 2,240KB
  • Queries Executed 11 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete