Class Memcached Not Found Lumen 5.4

Danny Connolly picture Danny Connolly · Feb 3, 2017 · Viewed 13.2k times · Source

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?

Answer

Leonardo Paglialunga picture Leonardo Paglialunga · Feb 3, 2017

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).