问题描述
我通过阅读安装了memcached本文在Windows7上,但不幸的是,我不断收到错误Fatal error: Class 'Memcache' not found in D:\xampp\htdocs\test\memcache\test.php on line 2
I installed memcached by reading this article on Windows7 but unfortunately i keep getting error Fatal error: Class 'Memcache' not found in D:\xampp\htdocs\test\memcache\test.php on line 2
第2行:$memcache = new Memcache;
Win7 64,已安装Xampp.我在命令行上使用net start "memcached Server"
,但是它说服务已经启动.
Win7 64, Xampp Installed. I am using net start "memcached Server"
on command line but it says service is already started.
一些其他信息可能会有所帮助;
Some other info which may help;
在php.ini文件上:
On php.ini file:
extension=php_memcache.dll
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
memcache.default_port = 11211
更新:phpinfo();显示dll未加载.到目前为止,已尝试了几个不同的dll文件,但无法正常工作. dll也位于正确的位置.看起来好像在正确的文件夹中.
Update: phpinfo(); show dll is not loaded. Tried several different dll files so far, didn't work. Also dll is located correct. It is in the right folder as it seems.
(PS某些人可能认为此主题可能重复,但是,他们遵循相同的指示,并且在SO中存在相同的错误.该问题自3月以来一直没有答案或解决方案.)
(P.S. Some may think there are possible duplicates about this topic but there is only 1 person who followed the same instructions and had same error in SO. That question has no answer or solution since march.)
推荐答案
我找到了适用于PHP 5.4.4的有效dll文件
I found the working dll files for PHP 5.4.4
我不知道它们的稳定性如何,但是它们确实可以工作.鸣谢到此链接.
I don't knowhow stable they are but they work for sure. Credits goes to this link.
http://x32.elijst.nl/php_memcache-5.4-vc9-x86.zip
这是2.2.5.0版本,编译后我注意到(对于PHP 5.4.4).
It is the 2.2.5.0 version, I noticed after compiling it (for PHP 5.4.4).
请注意,它不是2.2.6,但可以.我也将它们镜像到自己的FTP中.镜像链接:
Please note that it is not 2.2.6 but works. I also mirrored them in my own FTP.Mirror links:
这篇关于找不到类别"Memcache"的PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!