PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, November 12, 2022

[FIXED] How to install and use memcached in Windows for PHP?

 November 12, 2022     memcached, php     No comments   

Issue

I have installed memcached binary file in Windows 7 and started it as server.

When I type wmic process get description, exetuablepath | findstr memcached.exe I get the response: memcached.exe c:\memcached\memcached.exe on command line.

When I try running the sample code on php.net, I get on my browser:

Fatal error: Class 'Memcache' not found in C:\DocumentRoot\Framework\index.php on line 3 Call Stack: 0.0010 335928 1. {main}() C:\DocumentRoot\Framework\index.php:0

So, what is it that I am doing wrong? I am using memcache.dll since memcached.dll does not exist for Windows I believe?


Solution

This is for future vistors!

  1. check phpinfo() and see if it's listed.
  2. If not, check whether extension is enabled in php.ini and then check apache error logs for error message! dll should be complied with the same compiler the php is. (VC9 or VC6) btw, memcache.dll is fine

You can get the php extension "memcache" to use memcached with php on windows here http://downloads.php.net/pierre/

Memcached is the server daemon and you can get it for windows here http://splinedancer.com/memcached-win32/



Answered By - Venu
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing