vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Memcache may not work, how to configure config.php for memcache? (https://vborg.vbsupport.ru/showthread.php?t=321525)

postcd 01-18-2016 09:26 AM

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

Dragonsys 01-18-2016 02:26 PM

Quote:

Originally Posted by postcd (Post 2562871)
This is from vbulletin config.php

That section is commented out. Remove the /* at the start and */ at the end to uncomment it.

squidsk 01-18-2016 02:32 PM

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...");
}
?>


postcd 01-18-2016 04:19 PM

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? :-(

Dave 01-18-2016 04:32 PM

Memcached is not the same as Memcache. They are different modules.

postcd 01-18-2016 07:23 PM

Quote:

Originally Posted by Dave (Post 2562898)
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.

webmastersun 01-19-2016 03:11 AM

Have you set memcached port and enable it on your server after installed?

postcd 01-19-2016 08:48 AM

Quote:

Originally Posted by webmastersun (Post 2562949)
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 :(


All times are GMT. The time now is 08:37 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.01085 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete