手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

Installing Memcached for PHP 5.3 on Windows 7

首页 > PHP >

说出来让我郁闷,memcached -d install。。。一直无法安装成服务,所以,我每次在运行的时候都是memcached -d,窗口不会关闭。。。很丑。

看看老外怎么说,它来自http://shikii.net/blog/installing-memcached-for-php-5-3-on-windows-7/:

Updated:

First off, all credits go to this guy. I’m just listing the steps on how I did it in Windows 7 with PHP 5.3. Also, I tested this using WampServer but I believe it should work on any PHP install.

Install memcached

  1. Download the Memcached Win32 library here: http://code.jellycan.com/memcached. Just get the Win32 binary (direct link). Extract the downloaded archive file in a directory (e.g. c:\memcached). There should be a memcached.exe in there.
  2. Run a command prompt as an administrator. Some info on how to do that here. 【可能就是因为这个,所以我无法装成服务???】
  3. Install memcached as a service. Go to the memcached directory, type and run:

    memcached -d install

    If you get an error saying “MSVCP71.dll is missing”, see this page for a solution.

  4. Start the memcached service by running:

    memcached -d start
  5. You can verify if memcached is running by executing this in the command line:

    wmic process get description, executablepath | findstr memcached.exe

    You should see a result list showing memcached.exe and its full path.

Install PHP Memcache extension (php_memcache.dll)

  1. Chances are you don’t have php_memcache.dll in your PHP extensions yet. You can download a build of it here. Basu has noted in the comments that VC6 builds are no longer available from that link. You can download the correct build here.
  2. The archive should contain php_memcache.dll. Extract the archive to your php extensions directory. On my system (WampServer), this was C:\wamp\bin\php\php5.3.0\ext.
  3. Edit php.ini, add this line to enable the extension:

    extension=php_memcache.dll

    Or if you’re using WampServer, restart it and enable the extension through the WampServer system tray menu.

Test

Test the installation using the sample PHP code here: http://www.php.net/manual/en/memcache.examples-overview.php.




本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

Tags: memcached

« 上一篇 | 下一篇 »

只显示10条记录相关文章

发表评论

评论内容 (必填):