Tuesday, November 19, 2013

Re: CakePHP and Redis (plugin vs native access through Redis Class)

Hi - to anyone who is interested in the CakePHP Redis plugin problem mentioned above.

After looking through the plugin's GitHub page, I traced the problem to the Extension->isEnabled() method. Although the Redis client was working from PHP's CLI, it was not working through Apache.

I realised that I hadn't enabled the Apache PHPRedis extension (in /etc/apache2/php.ini). Once I did this, and restarted the server, the problem was solved.

I'd highly recommend Redis for in-memory sorted sets.

Thanks..

On Saturday, 16 November 2013 17:15:03 UTC+2, Matthew Croxon wrote:
Hi guys,

Background:
I'd like to use Redis for some ranked leaderboards that I'm looking to implement in my site. I have googled around, and found that the cakephp-redis plugin (https://github.com/nanapi/cakephp-redis) that I'm trying to setup.

First question:
 I get the following error:
Missing Database Connection
Error: A Database connection using "RedisSource" was missing or unable to connect. 
The database server returned this error: Selected driver is not enabled
Error: RedisSource driver is NOT enabled
 
I have followed the installation guide. I have completed all pre-requisites (including compiling phpredis - and testing that I can access from a simple PHP script).

And in a more general sense, the second question:
I've also noticed to CakePHP uses Redis as an alternative to the Filesystem for Caching. Does CakePHP allow for direct calls to the underlying datasource using the following API (http://api.cakephp.org/2.3/class-Redis.html)? And if so, what would I need to do to use this class?

Thanks in advance for the help,

Matthew 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: