Laravel Valet的网站找不到Memcache,但我看到这个过程正在运行 - 现在怎么办?

我有一个依赖于Memcached的本地WP站点。 自述文件说“使用memcached和PECL内存缓存扩展为WordPress对象缓存提供后备存储。”</ p>

据我所知,我的配置符合这些要求。 但是当我尝试访问该应用程序时,我得到:</ p>

致命错误:未捕获错误:未找到类'Memcache'。 。</ code> </ p>

我正在运行通过Homebrew安装的php 7.3,以及通过PECL安装的Memcached 3.1.3。 Memcached 3.1.3说它与php 7.3兼容,我遵循这些说明 将Memcache添加为我的php服务器的扩展。 如果我通过Homebrew启动php,我可以在运行 ps -ef |时看到Memcache进程 grep -i memcached </ code>,当我运行 php --info |时出现配置 grep memcached \。</ code>但是,我无法通过我的代客应用程序或Telnet连接到Memcached。 </ p>

如果我通过Homebrew运行Memcached,我会得到一个不同的版本, 1.5.13 </ code>,我认为它早于php 7.3。 据我所知,Homebrew只安装稳定的版本。 当Homebrew Memcache运行时,我可以通过Telnet连接,但不能通过Valet应用程序连接。</ p>

Homebrew安装的Memcached有什么不同? 我认为Homebrew必须以某种方式使Memcache可以从外部访问,但我不知道幕后发生了什么。 </ p>
</ div>

展开原文

原文

I have a local WP site that depends on Memcached. The readme says "Use memcached and the PECL memcache extension to provide a backing store for the WordPress object cache."

As a far as I can tell, my config meets those requirements. But when I attempt to access the application, I get:

Fatal error: Uncaught Error: Class 'Memcache' not found in. . .

I'm running php 7.3 installed via Homebrew, and Memcached 3.1.3, installed via PECL. Memcached 3.1.3 says it's compatible with php 7.3, and I followed these instructions to add Memcache as an extension to my php server. If I start php via Homebrew, I can see the Memcache process when I run ps -ef | grep -i memcached, and the config appears when I run php --info | grep memcached\\. But, I can't connect to Memcached through my Valet app or through Telnet.

If I run Memcached through Homebrew, I get a different version, 1.5.13, which I think predates php 7.3. As I understand Homebrew only installs stable releases. When the Homebrew Memcache is running I can connect via Telnet, but not through the Valet app.

What's different about the Homebrew install of Memcached? I assume Homebrew must somehow make Memcache externally accessible but I don't know what's going on behind the scenes.

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐