3

I have winginx on my windows machine which comes with memcached server and module. I have it running on port 11211. I have xampp on my machine as well and I need to connect to the memcached server through xampp. I used this tutorial to add the php_memcache extension to my php-xampp. Also, referenced here and here at stackoverflow. I have xampp version 1.7.4 with PHP 5.3.5 (VC6 X86 32bit).

I still get the error "class Memcache not found" or "call to undefined function memcache_connect()". Is there a problem with the php_memcache dll I am using - I have tried both x86 and 64 bit versions?

Any help is appreciated.

5
  • 1
    First: Check that memcache apear in php_info();
    – Atrakeur
    Aug 14, 2013 at 8:31
  • Make sure you're using the right extension: PHP has memcache and memcached, check phpinfo() to see which is actually enabled
    – Mark Baker
    Aug 14, 2013 at 8:32
  • Actually, neither is enabled. memcache does not appear in phpinfo. I am using the memcache dll build from vc9 and php from vc6, will that be a problem ? Aug 14, 2013 at 8:37
  • 1
    Check the apache log from when you restarted the server, it should indicate if there's a problem with the php_memcache.dll file
    – Mark Baker
    Aug 14, 2013 at 9:01
  • You are right. The log helped me figure out the problem. I have solved the issue. Thanks. Aug 14, 2013 at 9:04

1 Answer 1

2

The issue was with the compiler versions mismatch(I had vc6 for php and memcache was build from vc9). One of the posts from this discussion states php has dropped support for vc6, so I reinstalled xampp which had php 5.4 with vc9. Used the memcache dll in http://windows.php.net/downloads/pecl/releases/memcache/3.0.6/php_memcache-3.0.6-5.4-ts-vc9-x86.zip and everythin worked fine!

Thanks for the help.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.