Resource icon

Zend Redis Cache 1.6.0

No permission to download
https://pecl.php.net/package/redis/3.0.0
It exists.

How did you install php7? As this will determine how you install phpredis for php7. centmin mod makes it an easy to pick option.

I've halfed fixed this issue. Plesk allows me to use multiple versions of PHP, I just had to set PHP 7 as default by editing .bashrc_profile
Now this error on pecl upgrade redis,

Code:
/tmp/redis/common.h:3:43: fatal error: ext/standard/php_smart_string.h: No such file or directory
#include <ext/standard/php_smart_string.h>
                                           ^
compilation terminated.
make: *** [redis.lo] Error 1
ERROR: `make' failed

Any idea?
 
I don't know how to support Plesk configuration, but v3 phpredis is quite recent so it might not have updated yet.
 
I've recently upgraded my server to PHP 7.0.10 and started noticing some errors popping up here and there. I am currently experiencing a server error in which XenForo outputs below. I also recently upgraded my cURL version to 7.50.1.

Error Log
Code:
CredisException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. - library/Redis/lib/Credis/Client.php:1144

Stack Trace
Code:
#0 /home/nginx/domains/domain.com/public/library/Redis/Cm/Cache/Backend/Redis.php(211): Credis_Client->__call('hget', Array)
#1 /home/nginx/domains/domain.com/public/library/Zend/Cache/Core.php(404): Cm_Cache_Backend_Redis->load('xfxx_data_brBri...', true)
#2 /home/nginx/domains/domain.com/public/library/SV/RedisCache/RedisDataRegistry.php(281): Zend_Cache_Core->save('a:0:{}', 'xfxx_data_brBri...')
#3 /home/nginx/domains/domain.com/public/library/*******/*******Helper/1000200/Model/ListenerClass.php(30): XenForo_Model_DataRegistry->set('br*******AddOns', Array)
#4 /home/nginx/domains/domain.com/public/library/*******/*******Helper/1000200/EventListeners.php(43): *******_*******Helper_Model_ListenerClass->rebuild*******AddOnsCache()
#5 /home/nginx/domains/domain.com/public/library/XenForo/CodeEvent.php(90): *******_*******Helper_EventListeners::initListenerClass(Object(XenForo_Dependencies_Public), Array)
#6 /home/nginx/domains/domain.com/public/library/XenForo/Dependencies/Abstract.php(215): XenForo_CodeEvent::fire('init_dependenci...', Array)
#7 /home/nginx/domains/domain.com/public/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#8 /home/nginx/domains/domain.com/public/index.php(13): XenForo_FrontController->run()
#9 {main}

Request State
Code:
array(3) {
  ["url"] => string(48) "http://www.domain.com/index.php?chat/refresh"
  ["_GET"] => array(1) {
    ["chat/refresh"] => string(0) ""
  }
  ["_POST"] => array(16) {
    ["room_id"] => string(1) "0"
    ["user_rooms"] => array(1) {
      [0] => string(5) "61663"
    }
    ["last_id"] => string(5) "61663"
    ["activity_last_id"] => string(1) "0"
    ["activity_last_update"] => string(1) "0"
    ["users_last_update"] => string(1) "0"
    ["inverse"] => string(1) "0"
    ["hide_bot"] => string(1) "0"
    ["no_users"] => string(1) "0"
    ["show_ignored"] => string(1) "0"
    ["all_pages"] => string(1) "0"
    ["loading"] => string(1) "0"
    ["_xfRequestUri"] => string(10) "/index.php"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

Example:
Screenshot_19-27-36.png


There are articles out for a workaround fix just by disabling RDB snapshots all together but I don't know if that'll affect anything.
 
This is Redis telling you very loudly that your setup is miss-configured:
Code:
CredisException: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. - library/Redis/lib/Credis/Client.php:1144

Check the owernship of the /var/lib/redis directory.
 
@Xon
regarding opcache.revalidate_freq, sometimes that give me problems with install/update addons, and one time yours addon too was target too.
Mine is set to 180, that is default by php.
I see that earlier recommanding setting was 60
Now I look through several threads here, and Chris D said that 2 is optimal.
Eva2000 said that lower frequency will have impact on server.

So, if I set 5 second or 10 or even 60, will that will be stress for server to much?
What you suggest.
this is my zendopcache.ini configuration at this moment

Code:
zend_extension=opcache.so
;opcache.error_log=/var/log/php_opcache_error.log
opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_wasted_percentage=5
opcache.max_accelerated_files=16000
; http://php.net/manual/en/opcache.configuration.php#ini.opcache.revalidate-freq
; defaults to zend opcache checking every 180 seconds for PHP file changes
; set to zero to check every second if you are doing alot of frequent
; php file edits/developer work
; opcache.revalidate_freq=0
opcache.revalidate_freq=180
opcache.fast_shutdown=0
opcache.enable_cli=0
opcache.save_comments=1
opcache.enable_file_override=1
opcache.validate_timestamps=1
opcache.huge_code_pages=0
 
What you suggest.
this is my zendopcache.ini configuration at this moment
just get into habit of restart php-fpm whenever you are updating php files or when php files you upload overwrite/replace existing php files :)

updating a XF addon
Code:
cd /path/to/xfaddonextracted/upload
\cp -Rpf * /path/to/xfinstall
service php-fpm restart
 
So, if I set 5 second or 10 or even 60, will that will be stress for server to much?
What you suggest.
this is my zendopcache.ini configuration at this moment
Mine is
opcache.revalidate_freq=60
and I don't have any issues with add-ons when upgrading.

Remember, you also need to ensure
opcache.validate_timestamps=1
when using opcache.revalidate_freq
 
The git master copy of @ChrisD's add-on install and upgrade is vastly more aggressive about flushing the php opcode cache when installing an add-on.

But it still has issues sometimes if you have multiple webnodes, but that is the installer deployment code is designed to be flexible, as you could plug in something to ssh to a node an restart php-fpm or flush the opcode cache.
 
Redis 3.2.4 is released, everyone needs to update now.

Code:
================================================================================
Redis 3.2.4     Released Mon Sep 26 08:58:21 CEST 2016
================================================================================

Upgrade urgency CRITICAL: Redis 3.2 and unstable contained a security
                         vulnerability fixed by this release.

Hello Redis Wizards of the Memory Stores Empire,

this is a Redis critical release in order to fix a security issue
which is documented clearly here:

   https://github.com/antirez/redis/commit/6d9f8e2462fc2c426d48c941edeb78e5df7d2977

Thanks to Cory Duplantis of Cisco Talos for reporting the issue.
 
Redis 3.2.4 is released, everyone needs to update now.

Code:
In order for the instance to be at risk, at least one of the following
conditions must be true:

    1. The attacker can access Redis remotely and is able to send
       the CONFIG SET command (often banned in managed Redis instances).

    2. The attacker is able to control the "redis.conf" file and
       can wait or trigger a server restart.

I would expect this means most VPS and dedicated server admins with Redis will be 'safe'.
None the less, upgrading and keeping current is always crucial.
 
Redis 3.2.4 is released, everyone needs to update now.

Code:
================================================================================
Redis 3.2.4     Released Mon Sep 26 08:58:21 CEST 2016
================================================================================

Upgrade urgency CRITICAL: Redis 3.2 and unstable contained a security
                         vulnerability fixed by this release.

Hello Redis Wizards of the Memory Stores Empire,

this is a Redis critical release in order to fix a security issue
which is documented clearly here:

   https://github.com/antirez/redis/commit/6d9f8e2462fc2c426d48c941edeb78e5df7d2977

Thanks to Cory Duplantis of Cisco Talos for reporting the issue.
I'm not sure I'd want to 'panik' people too much, the release notes go on to say
Code:
Please note that since having access to CONFIG SET also means to be able
to change the AOF filename (and many other things) directly, this issue
actual real world impact is quite small, so I would not panik: if you
have CONFIG SET level of access, you can do more and more easily.
I have only just started considering switching to redis as I wanted to do some funky counter stuff and this plugin looks like it will do the job nicely
 
I'm not sure I'd want to 'panik' people too much, the release notes go on to say
Code:
Please note that since having access to CONFIG SET also means to be able
to change the AOF filename (and many other things) directly, this issue
actual real world impact is quite small, so I would not panik: if you
have CONFIG SET level of access, you can do more and more easily.
Yeah. Best practice is to ensure you only let trusted connections access Redis.

For a XenForo forum, a "KEYS *" call followed by some fetches and they can fetch a lot of information you probably want to keep secret.

I have only just started considering switching to redis as I wanted to do some funky counter stuff and this plugin looks like it will do the job nicely
Have a look at my implementation of UserActivity. It uses a sorted set to implement reasonably efficient recent viewers per thread/conversation. It doesn't have a MySQL fallback path since that isn't a use case I care about.
 
Have a look at my implementation of UserActivity. It uses a sorted set to implement reasonably efficient recent viewers per thread/conversation. It doesn't have a MySQL fallback path since that isn't a use case I care about.
That looks pretty good - the sort of stuff that Reds does well.
I wrote a trending likes addon for my forum, and it has been running for a year or two, but the database overhead on it is just killing it, despite the fact that I already cache the results for extended periods, so time to switch.
 
That looks pretty good - the sort of stuff that Reds does well.
I wrote a trending likes addon for my forum, and it has been running for a year or two, but the database overhead on it is just killing it, despite the fact that I already cache the results for extended periods, so time to switch.
Have a look at my Trending Content Tags add-on (there is a link to the GitHub repo too). This actually weights trending tags by Likes (and a few other configurables), and uses redis to cache/absorb spiky writes by sample period before being pushed to the database for long-term storage.

It is very likely not be an exact fit.
 
Is this worth using on a low traffic site?

Just recently switched to PHP 7 & have version 3.0.0 of Redis available.
 
Suddenly this two errors show up. And after that everything back to normal.
Should I do something or just leave it as is?
@Xon any thoughts about this?

Code:
Server Error Log
Error Info
CredisException: protocol error, got ' ' as reply type byte - library/Redis/lib/Credis/Client.php:1104
Generated By: Unknown Account, Today at 03:17
Stack Trace
#0 /home/nginx/domains/pijanitvor.com/public/library/SV/RedisCache/RedisDataRegistry.php(175): Credis_Client->__call('exec', Array)
#1 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
#2 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#3 /home/nginx/domains/pijanitvor.com/public/index.php(13): XenForo_FrontController->run()
#4 {main}
Request State
array(3) {
  ["url"] => string(47) "https://www.pijanitvor.com/index.php?liveupdate"
  ["_GET"] => array(1) {
    ["liveupdate"] => string(0) ""
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(45) "/threads/pokusaj-ribolova-linjaka-zimi.15380/"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}


Code:
Server Error Log
Error Info
CredisException: read error on connection - library/Redis/lib/Credis/Client.php:1104
Generated By: Unknown Account, Today at 03:17
Stack Trace
#0 /home/nginx/domains/pijanitvor.com/public/library/Redis/lib/Credis/Client.php(608): Credis_Client->__call('select', Array)
#1 /home/nginx/domains/pijanitvor.com/public/library/Redis/Cm/Cache/Backend/Redis.php(144): Credis_Client->select(0)
#2 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
#3 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Redis', Array, false, false)
#4 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Application.php(763): Zend_Cache::factory('Core', 'Redis', Array, Array)
#5 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Application.php(973): XenForo_Application->loadCache(Object(Zend_Config))
#6 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Application.php(1004): XenForo_Application->lazyLoad('cache', NULL)
#7 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Application.php(1669): XenForo_Application::get('cache')
#8 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Model.php(146): XenForo_Application::getCache()
#9 /home/nginx/domains/pijanitvor.com/public/library/SV/RedisCache/RedisDataRegistry.php(152): XenForo_Model->_getCache(true)
#10 /home/nginx/domains/pijanitvor.com/public/library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
#11 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#12 /home/nginx/domains/pijanitvor.com/public/index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
  ["url"] => string(27) "https://www.pijanitvor.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Top Bottom