I'm going crazy about this error. I've got a vagrant VM with Debian 7, generated with Puphpet, installation was fine.
1. Redis is installed and working
redis-server
is running :
I can use the server on 127.0.0.1:6379
:
2. php5-redis is installed
php5-redis
is actually installed :
3. Laravel Redis config is set
Here is my redis config file in app/local/database.php
:
'redis' => [
'cluster' => false,
'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
],
],
4. The call to Redis is simple :
// Get redis
$redis = Redis::connection();
5. I tried a lot of things
sudo service nginx reload
sudo service redis-server force-reload
composer dumpautoload
But nothing solved the error.
I'm still having :
ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined method Redis::connection()' in /var/www/fd/app/menus/admin.menu.php:16
(line 16 is where I do the connection $redis = Redis::connection();
)
Where am I wrong ?
Btw, I hate mondays >.>