首先下载资源包

要跟你的php 版本一样 否则有的不能用


1. 下载memcached的windows稳定版,解压放某个盘下面,比如在d:\memcached
2. 在终端(也即cmd命令界面)下输入 'd:\memcached\memcached.exe -d install' 安装
3. 再输入: 'd:\memcached\memcached.exe -d start' 启动。NOTE: 以后memcached将作为windows的一个服务每次开机时自动启动。这样服务器端已经安装完毕了。
4.下载php_memcache.dll,请自己查找对应的php版本的文件
5. 在D:\php\php.ini 加入一行 'extension=php_memcache.dll'


D:\soft\PHPnow-1.5.6\php-5.2.14-Win32>php -m
[PHP Modules]
bcmath
calendar
com_dotnet
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
mysqli
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib
[Zend Modules]

没有memcache 模块

去 php.ini 里添加

; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
extension=php_memcache.dll
;extension=php_bz2.dll
extension=php_curl.dll


然后重新查看 php -m

[PHP Modules]
bcmath
calendar
com_dotnet
ctype
curl
date
dom
filter
ftp
gd
hash
iconv
json
libxml
mbstring
mcrypt
memcache
mysql
mysqli
odbc
pcre
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

重新nginx 查看php info 也会看到 ok 搞定了

telnet 127.0.0.1 11211

C:\Documents and Settings\Administrator>telnet 127.0.0.1 11211

端口起来就行了

window php支持 memcache nginx 架构_start

window php支持 memcache nginx 架构_资源_02

window php支持 memcache nginx 架构_windows_03