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
PHP
TIPS
General
Identity Theft
Optimization
Check PageSpeed
Plesk Panel
Plesk: Disable Nginx and Rebuild Httpd Configuration
MySQL
Calculate Query Cache
Web Server
Security HTTP Headers

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

Optimization
PHP Code Optimization
Linux
Manage and Tweak Dedicated Linux Hosting Web Server
PHP
TIPS
PHP
Apache Prefork versus Worker

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

  • Domain Name
  • General
    • Servers
    • Web Server
    • Website Formatting
  • IT Companies
  • Linux
  • MySQL
  • Optimization
    • PHP
  • Troubleshooting
  • Web Hosting Control Panel
    • Plesk Panel
  • Websites
    • CSS
    • HTML
    • Optimization
  • Windows
    • Windows 10

Recent Posts

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

Copyright © 2025 Technology Forum.

Theme: Oceanly News by ScriptsTown