PHP 内存缓存问题

发布于 2024-12-05 17:19:36 字数 1430 浏览 0 评论 0 原文

我正在尝试在本地主机上设置内存缓存服务器。现在,在你继续跟我讲之前,这里有一个重复的列表。

重复:

  1. Memcache 连接但不响应任何命令
  2. 无法将值存储到内存缓存
  3. 超级奇怪的 PHP 错误

但是 他们都没有解决我的问题,或者根本就没有解决我的问题就不再追了。一条评论提到了我的telnet问题,但没有回复。

这是设置:

  1. Xampp 1.7.4 (VC6)
  2. memcache 2.2.5
  3. memcached 1.2.6(从 1.2.1-1.4.5 尝试使用 memcache 相同 - 问题)

我已经遵循了这个和更多教程 http://www.leonardaustin.com/technical/how-to-install-memcached-on-xampp-on-windows-7。 Memcached 服务器作为服务运行,我可以很好地连接到它,但是我使用的任何命令都会以相同的错误结束:

Notice: Memcache::getversion() [memcache.getversion]: Server 127.0.0.1 (tcp 11211) failed with: Failed reading line from stream (0)

所以我去检查 telnet 是否有效。我输入的任何命令或任何与此相关的内容都会使我返回到命令行,而不会显示发生了什么情况。 memcached 没有提供任何日志,Windows 事件查看器中也没有任何提及。如果我尝试使用 putty 并记录它,除了我输入的 stats 命令之外,日志中没有任何内容。

我尝试将其设置为 20 个不同的端口。 netstat 告诉我它正在侦听该端口(tcp 和 udp)。防火墙已禁用。

我真的不知道这里发生了什么,我快要哭了:(任何类型的建议都受到高度赞赏。

I am trying to set up memcache server on my localhost. Now before you jump on with me duplicates here is a list of them.

Duplicates:

  1. Memcache connects but doesn't respond to any command
  2. cannot store values into memcache
  3. Super strange PHP error

However none of them solves my problem or it just isnt followed anymore. One comment mentiones my telnet issue, but there is no reply to it.

This is the setup:

  1. Xampp 1.7.4 (VC6)
  2. memcache 2.2.5
  3. memcached 1.2.6 (tried with memcache from 1.2.1-1.4.5 same - problem)

I have followed this and many more tutorials http://www.leonardaustin.com/technical/how-to-install-memcached-on-xampp-on-windows-7. Memcached server is running as service, I can connect fine to it, but any command I use ends with the same error:

Notice: Memcache::getversion() [memcache.getversion]: Server 127.0.0.1 (tcp 11211) failed with: Failed reading line from stream (0)

So I went to check up with telnet if it works. Any command I enter or anything for that matter will return me back to command line without any indication whats going on. There is no log supplied with memcached or any mention in windows event viewer. If I try to use putty and log it, there is nothing in the log except the stats command I typed.

I tried to set it up to like 20 different ports. netstat tells me it is listening on that port (tcp and udp). Firewall is disabled.

I have really no idea whats going on here and I am about to cry :( ANY kind of advice is highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傲性难收 2024-12-12 17:19:36

我不知道如何解决你的问题...抱歉:(...但是尝试这个类检查它是否有效,命令与memcached相同(并且它的memcached不是memcache,你有append之类的东西)但它使用套接字连接到memcahed所以它不符合php它有点慢

https://github.com/pompo500/xslib-memcached/blob/master /xslib-memcached.php

i dont know how to fix your problem...sorry :(... but try this class check if it works, the commands are same as memcached (and its memcached not memcache you have append and such stuff) but it uses the socket to connect to memcahed so its not complied with php its a lil bit slower.

https://github.com/pompo500/xslib-memcached/blob/master/xslib-memcached.php

梦冥 2024-12-12 17:19:36

我认为问题出在 memcached.exe 中。您能确认 memcached 正在运行吗?您可以通过在控制台上执行以下命令来测试它:

wmic process get description,executablepath | findstr memcached.exe

I suppose the problem is in memcached.exe then. Can you confirm that memcached is running? You can test it by executing this on the console:

wmic process get description, executablepath | findstr memcached.exe

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文