正确安装后未找到Laravel 5 memcached [英] Laravel 5 memcached not found while properly installed

查看:186
本文介绍了正确安装后未找到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.

这篇关于正确安装后未找到Laravel 5 memcached的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆