With the IPS4 beta code and documentation about phpredis I created a Redis class for Invision Board 3.3.x and 3.4.x With some simple file modifications you can make this easily work on your own webserver to make use of the very fast Redis key-value store. Please notice you first have to install Redis and the PHP Redis module on your server. It seems Redis only needs a few MB of memory to store the date. This will be probably more with IPS4, because IPS has many caching improvements.
1. Download the attachment ( RedisCache.zip ) and upload classCacheRedis.php to the ips_kernel directory
2. Add the following code to ipsRegistry.php in admin/sources/base above the Eaccelerator... code: //--------------------------------
if( ipsRegistry::$settings['use_redis'] == 1 )
require( IPS_KERNEL_PATH.'interfaces/interfaceCache.php' );/*noLibHook*/
require( IPS_KERNEL_PATH.'classCacheRedis.php' );/*noLibHook*/
self::$cacheLib = new classCacheRedis( ipsRegistry::$settings['board_url'] );
} 3. Change in the ipsRegistry.php file the if at Eaccelerator to else if You should get the following: else if( function_exists('eaccelerator_get') AND ipsRegistry::$settings['use_eaccelerator'] == 1 ) 4. Add the following line to conf_global.php: $INFO['use_redis'] = '1'; 5. Happy fast IPB Redis caching! # Server
Notice: I only tested this on one server. Use of the code is at your own risk!
It seems that the changes in core.php in IPB 3.3.x break embedded videos from YouTube, Vimeo, etc... The iframe part seems to break all embedded media video's when you edit a post with a media video. if ( $fixScript )
$txt = preg_replace( '#<(\s+?)?s(\s+?)?c(\s+?)?r(\s+?)?i(\s+?)?p(\s+?)?t#is' , "<script" , $txt );
$txt = preg_replace( '#<(\s+?)?/(\s+?)?s(\s+?)?c(\s+?)?r(\s+?)?i(\s+?)?p(\s+?)?t#is', "</script", $txt );
$txt = preg_replace( '#<(\s+?)?i(\s+?)?f(\s+?)?r(\s+?)?a(\s+?)?m(\s+?)?e#is' , "<iframe" , $txt );
$txt = preg_replace( '#<(\s+?)?/(\s+?)?i(\s+?)?f(\s+?)?r(\s+?)?a(\s+?)?m(\s+?)?e#is', "</iframe", $txt );
} Please notice that a check for script is always good and a script should never be embedded in a user post.
Some issues with the new classPost.php and classPostForms.php on IPB 3.3.4. I get white pages and are not able to post. I compared the files and just applied some fixes I felt necessary. Most webservers also check for exploits and XSS when making use of mod_security, Suhosin and other security additions.
Great to hear that the community forum is the biggest test for IPS4. Even with cache disabled everything seems to work fine and fast from the Netherlands. So I'm really looking forward to experience the new software at full speed with more optimizations and caching enabled.
Why do I need to change my password to login via the forget password procedure and why do I have to add 'security' questions? This almost seems there has been a leak. Is there something IPS is not telling me?
If you guys really value security you should look at Two-step Authentication (eg. Google Authenticator) . It is very easy to integrate in your website and it is actually an extra layer of security because somone actually has to fysical steal a device from you such as your phone or token generator and have to know your password to login. This is very unlikely.
What is likely someone guessing or just Google'ing or check your Facebook for the 'security' answers. It is really easy to find stuff as which movie I like (is on my Facebook) and what my mothers name is. That's why I use fake questions and fake answers and just write them on a piece of paper (also not that secure).
I hope IPS really take a second look at the security. All those horror stories about peoples there Apple/Paypal or Twitter account being hacked has been done thanks to social engineering and just simply Google'ing the answers to security questions. I really think security questions give a false sense of security!
We do actually cache our dynamic forum pages. We do this in certain cases for guests. Members always get the latest version off course.
For more information and tips see: http://community.invisionpower.com/topic/364153-great-results-with-nginx-cache/page-6?hl=nginx#entry2401354
I advise you to read all the tips and first test this in a separate environment with some of your users.You don't want to create nasty results where some members can view pages as other members.
I think the Google developer (Did you use Pagespeed Insight ?) is referring to images and other static content as mentioned by the members above me. This can be easily achieved by adding a .htaccess file if you are using Apache or preferable set the expires value for static content in Nginx to it's maximum ( expires max; ).
Thanks for sharing this great Hook for Invision Power Board.
For our crew it is very motivating to see that there are so many members online on our board each day.
The only thing I didn’t like about the hook is that it is using a resource intensive JOIN query to our database. That's why I made a small modification that caches the values for 10 minutes within the Invision Power Board disk cache.
NOTE: Why is the Invision cache so under used in plugins/hooks? It really makes your board run quicker if you do some 'smart' caching :smile: