未找到“Memcached"类 [英] Class 'Memcached' not found
问题描述
在尝试使用 Laravel 附带的内置 pHP 服务器使memcached"在我的 Windows 8 机器上运行失败后,我才开始使用 Homestead,使用 Homestead 无需我做任何事情就可以工作,但现在我已经移动了我的应用程序联机到我的 VPS 服务器 (Linux) 并且我不断收到此错误:
I just started using Homestead after unsuccessfully trying to get "memcached" to work on my Windows 8 machine using the inbuilt pHP server that comes with Laravel, with Homestead it work without me having to do anything but now I have moved my application online to my VPS server (Linux) and I keep getting this error:
"Class "Memcached" not found"
我从未使用过这个会话驱动程序,所以整个 memcached 主题对我来说都很新鲜.如何解决此问题并使我的应用程序在我的网络服务器上正常运行?
I have never used this session driver so this whole memcached topic is pretty new to me. How can I fix this issue and get my application to run normally on my web server?
推荐答案
Memcached 是一个可选包(默认安装在 Homestead 中).在 Ubuntu 中,您通常可以执行 sudo apt-get install php5-memcached
来安装软件包.参见 http://php.net/manual/en/memcached.installation.php 有关其他系统的详细信息 - 我尚未在 Windows 上安装它.
Memcached is an optional package (installed by default in Homestead). In Ubuntu, you can typically do sudo apt-get install php5-memcached
to install the package. See http://php.net/manual/en/memcached.installation.php for details on other systems - I haven't installed it on Windows.
请注意,您还需要一个 memcached 服务器.使用更简单的会话驱动程序可能会更好,例如 file
.如果您正在运行需要共享会话的多网络服务器集群,您只需要 memcached
/redis
.
Note that you'll need a memcached server too, though. You may be better off with a simpler session driver, like the file
one. You only really need memcached
/redis
if you're running a multiple-webserver cluster that needs shared sessions.
这篇关于未找到“Memcached"类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!