Step to install / enable memcache in WAMP (Windows-Apache-MySQL-PHP)

Just share...Share on FacebookShare on Google+Tweet about this on TwitterPin on PinterestShare on RedditShare on StumbleUponEmail this to someone

We are giving Step to install / enable memcache in WAMP (Windows-Apache-MySQL-PHP). All are simple steps and we are giving official sites for download.

Step to install / enable memcache in WAMP (Windows-Apache-MySQL-PHP)

Step to install / enable memcache in WAMP

  1. Place memcache.exe
  2. Download memcache.exe file from official site. Move that memcache.exe file (not a zip file) to following directory,
    c:\memcached

  3. Run memcache
  4. Open the command prompt and then run memcache service using following command line,
    C:\memcached\memcached.exe -d install

  5. Start memcache
  6. Now have to start memcahce server with following command line,
    c:\memcached\memcached.exe -d start

  7. php_memcache.dll
  8. Download php_memcache.dll file from official site and place that php_memcache.dll file into following directory,
    C:\wamp\bin\php\php[your-version]\ext
    If you are not using WAMP package,
    C:\php\ext

  9. Set Extension
  10. Find your php.ini file and add following line,
    extension=php_memcache.dll

  11. Extra
  12. Download the MSVCP71.DLL, msvcr71.dll files and place into following directory,
    C:\windows\sysWOW64 or system32

  13. Restart Apache
  14. Restart your Apache Server. If you are using wamp, use short method with taskbar icon to restart.
    Otherwise, restart with Command Prompt

    Enable Extension in WAMP

    For enable php_memcache extension,
    left click taskbar wamp icon -> PHP -> PHP Extensios -> php_memcache

    For Test:

    You can test the installation with following code,

    <?php
    $memcache = new Memcache;
    $memcache->connect(“localhost”,11211); # You might need to set “localhost” to “127.0.0.1”
    echo “Server’s version: ” . $memcache->getVersion() . “
    \n”;
    $tmp_object = new stdClass;
    $tmp_object->str_attr = “test”;
    $tmp_object->int_attr = 123;
    $memcache->set(“key”,$tmp_object,false,10);
    echo “Store data in the cache (data will expire in 10 seconds)
    \n”;
    echo “Data from the cache:
    \n”;
    var_dump($memcache->get(“key”));
    ?>

    For more -> php.net/memcache

    Notes:
    For more help and commands, use command line memcached -help. Then you can modify the ImagePath or others.

Just share...Share on FacebookShare on Google+Tweet about this on TwitterPin on PinterestShare on RedditShare on StumbleUponEmail this to someone
The following two tabs change content below.
I am Karthik, software engineer by profession. I'm giving some steps to installing, re-installing, updating, removing and any other related queries about software’s, operating systems, plug-ins and so on. You can find and follow me, from Social Media or here. Google+

Leave a Reply

Your email address will not be published. Required fields are marked *

Please Fill this Sum * Time limit is exhausted. Please reload CAPTCHA.