Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/261.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
I';我对Memcache vs Memcached vs php5 Memcache感到困惑_Php_Nginx_Memcached_Ubuntu 12.04 - Fatal编程技术网

I';我对Memcache vs Memcached vs php5 Memcache感到困惑

I';我对Memcache vs Memcached vs php5 Memcache感到困惑,php,nginx,memcached,ubuntu-12.04,Php,Nginx,Memcached,Ubuntu 12.04,我按照本文中的说明安装nginx、php和mysql,包括php5 memcache 我想知道我是否仍然需要安装memcache或没有“php5”前缀的memcached 到目前为止,我的WordPress网站正在抱怨ff: The following memcached servers are not responding or not running: Page Cache: 127.0.0.1:11211. Database Cache: 127.0.0.1:11211. Object

我按照本文中的说明安装nginx、php和mysql,包括php5 memcache

我想知道我是否仍然需要安装memcache或没有“php5”前缀的memcached

到目前为止,我的WordPress网站正在抱怨ff:

The following memcached servers are not responding or not running:

Page Cache: 127.0.0.1:11211.
Database Cache: 127.0.0.1:11211.
Object Cache: 127.0.0.1:11211.
This message will automatically disappear once the issue is resolved.
如果需要安装,是否与php5 memcache冲突?还是两个版本的过度使用

最好的版本是什么?Memcache还是Memcached?php5 memcache或php5 memcached


我听说带“d”的memcached只是一个服务或守护进程。但是,正如我所看到的,有人试图将两者进行比较。

memcache和memcached是两种不同的服务器,每种服务器都有一些功能和内容,您可以阅读其中的差异,因为前面有很多关于这方面的问题

以php开头的是用于访问服务的扩展,就像使用mysql需要php5-mysql,使用curl需要php5-curl一样。

所以您有php5 memcache for memcache和php5 memcached for memcached,您可以从这些链接中了解它们各自提供的内容:

EDIT:只想更正我上面写的错误信息,
php5 memcache
php5 memcached
连接到服务器,它们只是同一服务器的不同扩展,我想就像
php5 mysqli
vs
php5 mysqli


您仍然可以同时使用这两种服务,没有冲突,但我相信您只需要一种而不是两种,因为大多数功能都可以同时使用,有些功能提供了更多的功能,另一种候选服务是
redis
,您也应该了解这一点,它有一些memcached服务器中没有的功能。

这些扩展的名称令人困惑

实际上,php5 memcache和php5 memcached都是使用memcached服务()的PHP扩展。它们都使您的PHP进程能够成为memcached服务的客户端,即通过网络连接到memcached,并使用memcached API使用memcached协议

在我看来,php5 memcached扩展更稳定,并且有更多的功能,因此我建议,应该先试用它。它的大多数操作都太复杂了()


您仍然需要在某处启动的实际memcached服务及其地址,才能连接到它。如果需要分布式缓存,memcached服务可以在同一台主机上启动,也可以在另一台主机上启动。

谢谢。我还安装了pecl memcache,卸载它时,我在drupal站点中遇到一个错误
,您必须启用pecl memcache或memcache扩展才能使用memcache.inc
。在安装pecl之前,如何恢复以前的配置?我想pecl弄乱了我的配置。你卸载了memcache还是memcached后安装了它?试试
dpgk-l | grep memcache
,如果你没有得到任何东西,或者你只得到了以
php5-
开头的东西,那么只需使用
apt get
安装memcached就好了,尽管我不知道有一个叫做memcache的服务。有memcached和memcachedb(与memcached协议兼容,但提供持久性)。好的,我四处看看,显然你是对的,
php5 memcahche
php5 memcached
都是连接到
memcached
服务器的扩展,对不起,我的错了。无论如何,据我所知,
php5 memcached
提供了比
php5 memcache
更多的指令和功能