4

I installed php-5.4.9(32 bit) on my windows 7 (64 bit machine) and configured it to run as a php-fpm process. I need memcached for my web application and hence installed memcached daemon and the necessary dll file in my php\ext folder. But when I try to run my web application folder I always get Class Memcached not found error. I tried googling and also referred to some stackoverflow but couldn't find the solution to my problem.

Can somebody please help me understand what I am doing wrong?

My PHP Info 1


My PHP Info 2

Tojo Chacko
  • 1,230
  • 1
  • 13
  • 25
  • on your windows machine do you have php installed as XAMPP or WAMP or any bundled webserver software? you have have multiple installations of php that's referencing memcached. since you have memcached in your phpinfo() then it's definitely loaded and you don't need to re-start apache. – unixmiah Apr 07 '15 at 17:56
  • I see your question tagged as `memcached` and in the title it says **Class 'Memcached' not found-(php 5.4.9,windows 7)** but then you say you get **Class Memcache not found** error and from `phpinfo()` we can see that you have the `memcache` enabled. So which one do you really use? – mrun Apr 08 '15 at 05:13
  • @mrun: Sorry a typo from my part. I have updated the question – Tojo Chacko Apr 08 '15 at 06:49
  • @unixmiah: I have a XAMPP server installed by I m not using the bundled Apache web server. I have installed nginx separately and using fast cgi to connect to php-fpm. – Tojo Chacko Apr 08 '15 at 06:51
  • @Tojo Chacko: Well isn't it obvious now? You're missing the `memcached` extension :-) Please note that there are `memcache` and `memcached` extensions. More info [here](http://stackoverflow.com/questions/1442411/when-should-i-use-memcache-instead-of-memcached) – mrun Apr 08 '15 at 06:58
  • @mrun: There is only memcache client option in Windows unfortunately and hence I am using the php-memcache.dll. The sites which I referred to also pointed out the same thing. – Tojo Chacko Apr 08 '15 at 09:13

1 Answers1

0

memcached PECL extension is built on libmemcached, which has a libevent requirement. memcache PECL extension is built off an older spec of memcache, but not built on any lib.

memcache works everywhere, but memcached only builds on Linux/Mac OSX .

You may be able to build memcached PECL extension, but none currently exist.

If this is for development, maybe something like Vagrant to give yourself a Linux virtual server. This will allow you to run your development if your going to be using a Linux server later.

rockerBOO
  • 2,920
  • 2
  • 16
  • 22
  • Yeah i already know this. I cannot have a separate Linux VM on my localbox for running my web app. That is the reason I wanted to setup on Windows. For now since I have no alternative, I am not using Memcached on my localbox. – Tojo Chacko Apr 15 '15 at 06:39