How to enable memcache in WAMP

前端 未结 8 1695
礼貌的吻别
礼貌的吻别 2020-11-27 13:25

How to install memcache in WAMP?

I don\'t find any php_memche in php.ini.

What do I do now?

@Ryan

thanks for your step, now memc

相关标签:
8条回答
  • 2020-11-27 13:48

    Here are the steps that worked for me:

    Needed Files

    • memcached.exe Direct Link
    • MSVCP71.DLL Windows DLL Files
    • msvcr71.dll
    • php_memcache.dll Working memcache for PHP 5.3.4 OR REF

    Steps

    1. Copy MSVCP71.DLL, msvcr71.dll to C:\windows\sysWOW64
    2. Copy memcached.exe into C:\memcached
    3. Click Windows-Key
    4. Type: CMD
    5. press: Ctrl-Shift-Enter
    6. Choose yes
    7. type: C:\memcached\memcached.exe -d install
    8. type: C:\memcached\memcached.exe -d start
    9. Copy php_memcache.dll to C:\wamp\bin\php\php5.3.4\ext
    10. Restart Apache using Wamp controls
    11. Enable WAMP -> PHP -> PHP Extensions -> php_memcache
    0 讨论(0)
  • 2020-11-27 13:54

    to everyone having problems installing memcache for wamp here's how it worked for me.

    1. make sure you check you're phpinfo and look for "Compiler" mine shows MSVC9 (Visual C++ 2008) this is so you know if you download the dll for vc9 or vc6. also look for "Thread Safety" on phpinfo it shows enabled then you need to download the dll file that contains TS if disabled then you download the dll with the words NTS.

    below is where you can find the dll's for the diffent php versions make sure the version you download matches you're version:

    Make sure also you have 32 bit or 64 bit and you download it correctly

    then extract the files into your windows/system32 if you're windows is 32 bit or the system folder for 64 bit on you're windows.

    Also extract to you're wamp/bin/apache/bin and wamp/bin/you're_php_version/ext and also memcache.exe extract to this folder make sure you use memcached for 32 or 64 bit according to you're system.

    Once you finish this then you run the you're windows command prompt as administrator then browse to the location of you're executable memcache and do the following:

    step 1: memcache.exe -d install step 2: memcache.exe -d start

    then on you're wampserver open the tray menu and go to the php menu and click php.ini make sure you add on you're extensions in case not listed there: extension=php_memcache.dll

    restart you're wampserver and go to you're phpinfo and look for memcache if you see it then it's installed.

    hope it helps

    happy new year to all!

    0 讨论(0)
  • 2020-11-27 13:57

    I was stuck on this for a while so I decided to write my answer:

    Step 1: download the right package that compatible with your PHP version and your wamp version (32bit or 64 bit) from this site:

    Link for download site

    I suggest you download the "Thread Safe" one.

    Step 2: After you downloaded the package, you need to copy the php_memcache.dll in to your extensions folder at: C:\wamp\bin\php\{YOUR PHP VERSION}\ext

    Step 3: Add the extensions value to your php.ini file, to do this in the right place just search for another extension that is already installed like: extension=php_bz2.dll and just copy paste it at the end of this sections (after all the "extension=")

    extension=php_memcache.dll

    Step 4: close and open up your WAMP (not restarting - close and open) and you done.

    If you are having trouble now - just open the error log file (in the root directory) and check what is the error that you get there.

    My error was that my WAMP was a 32 bit, and i have downloaded 64 bit memcache

    This solve my problem, hope its helped.

    0 讨论(0)
  • 2020-11-27 13:59

    Memcache is a PECL extension and not bundled with PHP. Start with the manual page for installation instructions.

    • Download site (not sure how official but on PHP.net)

    • Installing a PHP extension on Windows

    0 讨论(0)
  • 2020-11-27 14:04

    Because my edit got rejected, here is what worked for me, as a supplement, after installing memcache on windows:

    Manually add the memcache configuration to the php.ini. NOTE: there might be two different php.ini's installed on your system. For me, modifying the one located in wamp64/bin/apache is the only one that worked:

    extension=php_memcache.dll
    [Memcache]
    memcache.allow_failover = 1
    memcache.max_failover_attempts=20
    memcache.chunk_size =8192
    memcache.default_port = 11211
    

    You may need to add the extension to the extension block;

    Inspired from this thread.

    0 讨论(0)
  • 2020-11-27 14:07
    1. Download memcache not memcached if you used windows.Download your php version wise (download link:https://pecl.php.net/package/memcache/3.0.8/windows)
    2. Copy php_memcache.dll to C:\wamp\bin\php\php5.3.4\ext
    3. Restart Apache using Wamp controls
    4. Enable WAMP -> PHP -> PHP Extensions -> php_memcache
    0 讨论(0)
提交回复
热议问题