Home >Backend Development >PHP Tutorial >Window 下如何安装 memcached

Window 下如何安装 memcached

WBOY
WBOYOriginal
2016-06-06 20:29:241152browse

已找到了 php_memcache.dll,安装成功,可以使用。
可官网并没有 memcached.dll 扩展,如何去找到 Memcached dll扩展

<code class="php"><?php $mcd = new Memcached();
//报错 atal error: Class 'Memcached' not found in D:\localhost\mcd.php on line 2</code></code>

另一疑点

phpinfo() 中显示有 memcache (v2.2.7),可 CLI 运行 php -m[PHP Modules] 里面却没有memcache 这个模块,但new Memcache() 是运行正常的。

回复内容:

已找到了 php_memcache.dll,安装成功,可以使用。
可官网并没有 memcached.dll 扩展,如何去找到 Memcached dll扩展

<code class="php"><?php $mcd = new Memcached();
//报错 atal error: Class 'Memcached' not found in D:\localhost\mcd.php on line 2</code></code>

另一疑点

phpinfo() 中显示有 memcache (v2.2.7),可 CLI 运行 php -m[PHP Modules] 里面却没有memcache 这个模块,但new Memcache() 是运行正常的。

windows下貌似只能$mcd = new Memcache();不能使用new Memcached()

memcached requires libmemcached which doesn't seem well supported on windows which is probably why that extension doesn't exist for windows

老版本的能找到,新版本的得找源码用VC编译,我曾经企图尝试,后来放弃了,楼主可以试试,源码在pecl

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn