正确安装后未找到Laravel 5 memcached
我在litespeed Web服务器上有PHP 5.4. PHP已使用memcached模块正确编译,并且我们还正确安装了memcached库.
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.
实际上,当我运行artisan命令时(服务器端)根本没有任何更改的情况下突然发生了问题,我得到了这个错误:
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
我在问题上进行了搜索,但找不到解决方案.我正在使用Laravel 5.0.
I googled the issue but was unable to find a solution. I am using Laravel 5.0.
我编辑了app/Http/Routes.php并在文件顶部返回了新的Memcached,并且返回了php对象,因此这意味着memcached已正确安装在服务器上...
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...
任何帮助将不胜感激.
找到了解决方案.我的问题是,当我运行artisan命令时,artisan使用的是另一版本的PHP(与Litespeed版本不同),而该PHP未使用memcached进行编译.
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.