Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class Memcached Not Found Lumen 5.4

When trying to run artisan commands I get the following error

[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Memcached' not found

I had recently been been working on another project that used Lumen 5.3 and had no problem running artisan commands. Both projects are on the same virtual box and apart from the Lumen versions there is no differences in server setup.

I've checked that Memcached is running and there is no problems.

I've tried composer dump-autoload, deleting the vendor folder and re-installing but none of these have made a difference.

I'd prefer not to have to go back to 5.3 if possible.

Is there a way to solve this issue?

like image 369
Danny Connolly Avatar asked Feb 03 '17 12:02

Danny Connolly


2 Answers

Had the same problem. Check if you have the memcached extension installed for the php version that you're using, and check also if it is correctly configured in the php.ini file (it could be looking in the wrong directory).

like image 151
Leonardo Paglialunga Avatar answered Oct 13 '22 22:10

Leonardo Paglialunga


looks like your memcahed is not installed or not properly configured.

for quick solution ,

use file cache driver instead of memcached

CACHE_DRIVER=file
like image 34
Mahfuz Avatar answered Oct 13 '22 22:10

Mahfuz