Laravel 5 memcached not found while properly installed

。_饼干妹妹 提交于 2019-12-13 05:59:14

问题


I have PHP 5.4 on a litespeed web server. PHP has been compiled properly with memcached module and we also installed properly memcached library.

In fact the problem suddenly happened without any change at all (server side) when I run the artisan command, I am getting this error:

PHP Fatal error: Class 'Memcached' not found in /laravel/vendor/laravel/framework/src/Illuminate/Cache/MemcachedConnector.php on line 52

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

I googled the issue but was unable to find a solution. I am using Laravel 5.0.

I edited the app/Http/Routes.php and returned new Memcached at the top of the file and the php object was returned so it means memcached is properly installed on the server...

Any help would be appreciated.


回答1:


Found the solution. My problem was when I was running the artisan command, the artisan was using another version of PHP (different than the Litespeed one) and this PHP was not compiled with memcached.



来源:https://stackoverflow.com/questions/31660915/laravel-5-memcached-not-found-while-properly-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!