Skip to content

Technology Forum

SEO, Speed Up website, Server Optimization, Linux, Open Source Softwares

  • Home
  • General
    • Web Server
    • Website Formatting
  • IT Companies
  • Optimization
    • PHP
  • Linux
  • Home
  • Optimization
  • PHP
  • Enable memcache in WAMP
Web Server
HTTP header and Server Response Codes
PHP
Encrypt and Decrypt for URL Using PHP
PHP
TIPS
Optimization
eAccelerator
Optimization
Check PageSpeed
MySQL
Script to convert InnoDB tables to MyISAM

Enable memcache in WAMP

Posted on November 26, 2017February 15, 2023 By admin No Comments on Enable memcache in WAMP
PHP

Download memcache for windows (DLL) from https://pecl.php.net/package/memcache

Extract the files (php_memcache.dll & php_memcache.pdb) and put in <drive>\wamp\bin\php\phpx.x.xx\ext

Update php.ini file with extension=php_memcache.dll (run test page with phpinfo and check “Loaded Configuration File” for php.ini configuration file )

Run following script to test memcache

$memcache = new Memcache;
$memcache->connect('localhost', 11211) or die ("Could not connect");
$version = $memcache->getVersion();
echo "Server's version: ".$version."<br/>\n";
$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;
$memcache->set('key', $tmp_object, false, 10) or die ("Failed to save data at the server");
echo "Store data in the cache (data will expire in 10 seconds)<br/>\n";
$get_result = $memcache->get('key');
echo "Data from the cache:<br/>\n";

var_dump($get_result);

Output:

 Server's version: 1.4.4-14-g9c660c0
 Store data in the cache (data will expire in 10 seconds)
 Data from the cache:
E:\Websites\httpdocs\index.php:43: 
object(stdClass)[3]
  public 'str_attr' => string 'test' (length=4)
  public 'int_attr' => int 123
Tags: Install Memcache in WAMP Memcache WAMP Setup Memcache in WAMP Windows-Apache-MySQL-PHP

Post navigation

❮ Previous Post: How to Force detecting the Social Profiles associated with a Website
Next Post: Resolving Public DNS Server List ❯

You may also like

MySQL
Calculate Query Cache
PHP
TIPS
PHP
Remove Apps from Windows 10
PHP
Encrypt and Decrypt for URL Using PHP

Leave a Reply Cancel reply

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

View Posts

  • PHP FPM modification – Plesk
  • HTML: Link rel – Preload
  • HTML: Attributes of rel
  • Linux Commands
  • Security HTTP Headers

Categories

Our links

  • Chandigarh Business Information Directory
  • Chandigarh City Business Information Directory
  • Customer Services, Support, Helpline, Toll Free Numbers
  • HelpDesk Punjab Business Directory
  • Indian Business Helpline Directory
  • Indian Cities Yellow Pages
  • Nice Time Pass Jokes Quotes Stories
  • Online Applications for Admissions / Jobs / Positions / Employment
  • Technical, Engineering, Medical Directory
  • Technology Forum
  • The Chandigarh City Business Pages
  • Tricity Helpline Chandigarh, Mohali, Panchkula – Business Directory

Copyright © 2025 Technology Forum.

Theme: Oceanly News by ScriptsTown