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
General
Extensible Markup Language (XML)
Web Server
Security Tips
Plesk Panel
Plesk: Disable Nginx and Rebuild Httpd Configuration
PHP
Resolving Public DNS Server List
MySQL
Calculate Query Cache
HTML
HTML: Link rel – Preload

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
PHP
Goodbye to DDOS
PHP
Encrypt and Decrypt for URL Using PHP
PHP
Plesk/Odin Services Structure

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