Closed andreoav closed 11 years ago
Check if you don't have another class defined called Redis. Some PHP installations seem to have an optional component like that loaded by default, which conflicts with our Redis class.
You can check that simply by creating a test.php, add $x = new Redis();
to it, and load it. If you don't get an error but a Redis object, this is the cause.
If you remove the backslash, the class is loaded from the current namespace (\Fuel\Core), which works because that does not conflict. It will however cause extension issues, and problems when you want to use Redis directly from your app controllers, so this is not a solution.
I thought was necessary an PHP Redis extension to get Redis working with FuelPHP. I disabled it and everything works fine now.
Thanks.
I'm trying to use redis as a cache engine in my new APP, I've just installed the redis server and php extension.
Now I'm getting the following error
ErrorException [ Error ]: Call to undefined method Redis::instance() COREPATH/classes/cache/storage/redis.php @ line 58
If I go to this file and remove the "\" from "\Redis::instance()" it works fine... I don't know the '\' causes this error.