first, in the window PHP operation memcached need to find a suitable extension, extended in the official download, address is:
Windows extended indexing site for PHP 5.2/5.3:
Here you can find things like Php_oci8.dll, Php_memcache.dll, Php_mongo.dll, Php_ Apc.dll, and other popular Windows extension DLL files, can also find some relatively unpopular but also useful PHP extensions, such as Php_oauth.dll, Php_solr.dll and other extensions
Http://downloads.php.net/pierre/
Windows extended indexing site for PHP 5.3/5.4/5.5:
Then you need to go to the following site to find the extension, the site can download to support the php5.4/5.5 pecl extension,
http://windows.php.net/downloads/pecl/releases/
Supported extended file Indexes:
Php_amqp.dll
Php_aop.dll
Php_apc.dll
Php_apcu.dll
Php_automap.dll
Php_bbcode.dll
Php_bitset.dll
Php_blenc.dll
Php_couchbase.dll
Php_dbx.dll
Php_dio.dll
Php_docblock.dll
Php_doublemetaphone.dll
Php_excel.dll
Php_fann.dll
Php_fribidi.dll
Php_gender.dll
Php_geoip.dll
Php_haru.dll
Php_htscanner.dll
Php_http.dll
Php_ibm_db2.dll
Php_igbinary.dll
Php_imagick.dll
Php_inclued.dll
Php_jsmin.dll
Php_jsonc.dll
Php_judy.dll
Php_libevent.dll
Php_lzf.dll
Php_mailparse.dll
Php_memcache.dll
Php_memoize.dll
Php_memsession.dll
Php_memtrack.dll
Php_mongo.dll
Php_msgpack.dll
Php_mysqlnd_ms.dll
Php_mysqlnd_qc.dll
Php_oauth.dll
Php_oci8.dll
Php_opcache.dll
Php_operator.dll
Php_pdflib.dll
Php_pdo_4d.dll
Php_pdo_ibm.dll
Php_pdo_informix.dll
Php_pdo_sqlanywhere.dll
Php_pdo_sqlsrv.dll
Php_pthreads.dll
Php_radius.dll
Php_rar.dll
Php_riak.dll
Php_scream.dll
Php_solr.dll
Php_sphinx.dll
Php_spl_types.dll
Php_sqlsrv.dll
Php_ssh2.dll
Php_stats.dll
Php_stem.dll
Php_stomp.dll
Php_taint.dll
Php_trader.dll
Php_translit.dll
Php_txforward.dll
Php_uploadprogress.dll
Php_uri_template.dll
Php_varnish.dll
Php_vld.dll
Php_weakref.dll
Php_win32ps.dll
Php_win32service.dll
Php_wincache.dll
Php_xdebug.dll
Php_xdiff.dll
Php_xhprof.dll
Php_xrange.dll
Php_xslcache.dll
Php_yaf.dll
Php_yaml.dll
Php_zip.dll
Php_zmq.dll
Two, so many extensions how to find the right extension need to pay attention to three points:
Code phpinfo (); See PHP for information, PHP version number,
Compiler |
MSVC9 (Visual C + + 2008) |
The above is what PHP is edited with
And also
Zend Extension Build |
Api220090626,ts,vc9 |
TS represents security, and NTS means that it is not safe to execute with the web but rather to execute with internal services:
Said so much reference to me above the main version number TS VC9,
Two, I found the following extension
Tuesday, October, 2013 1:19 AM 182281 php_memcache-3.0.8-5.4-ts-vc9-x86.zip
In php.ini, add extension extension=php_memcache.dll about php.ini can be
Loaded Configuration File |
D:\wamp\bin\apache\Apache2.2.21\bin\php.ini |
, why, because PHP can be installed at the same time copy a configuration file as a copy.
Three, restart Apache is OK.
Third, window memcached installed into service
memcached.exe-d Install
Memcached.exe-d start Four, a test example of PHP operation Memcached:
$memcache = Memcache_connect (' 127.0.0.1 ', 11211);
if ($memcache) {
$memcache->set ("Str_key", "String to store in memcached");
$memcache->set ("Num_key", 123);
$object = new StdClass;
$object->attribute = ' Test ';
$memcache->set ("Obj_key", $object);
$array = Array (' Assoc ' =>123, 345, 567);
$memcache->set ("Arr_key", $array);
Var_dump ($memcache->get (' Str_key '));
Var_dump ($memcache->get (' Num_key '));
Var_dump ($memcache->get (' Obj_key '));
$ar = $memcache->get (' Arr_key ');
Echo GetType ($ar);
}
else {
echo "Connection to memcached failed";
}
The above only introduces the key parts, others do not know, please leave a message.