1

I'm trying to use Memcached with PHP 7.1.3 on Windows 10 64-bit. Nothing I'm doing is working and here's what I've done so far:

  1. I've run Memcached.exe and started it as a service. Under Services, "memcached" is running and is set to Automatic.
  2. I've added the php_memcache.dll file to the /ext directory in my PHP folder.
  3. I've enabled memcache in my php.ini file by adding "extension=php_memcache.dll" (no quotes)
  4. Restarted my computer.

When I run phpinfo(); it doesn't show up. I've checked that I've modified the correct php.ini file, and still nothing. I've also downloaded several versions of php_memcache.dll and none of them seem to make any difference.

When I run the following code:

$memcache = new Memcache();

It gives me the error message: "Class 'Memcache' not found ... "

Any ideas?

I'm using Windows 10 64-bit, IIS 10 and PHP 7.1.3

user4496950
  • 93
  • 1
  • 1
  • 11
  • If it doesn't show up in `phpinfo()` that means it isn't loaded, so your code can't possibly work. You need to get it to show up there first. – tadman Apr 19 '17 at 06:45
  • I've added "extension=php_memcache.dll" to my php.ini file so I'm not sure what else to do to "load" the extension. – user4496950 Apr 19 '17 at 06:53
  • Look at the php error log. – Mawia HL Apr 19 '17 at 07:20
  • Possible duplicate of http://stackoverflow.com/questions/34173231/how-to-install-memcache-on-xampp-windows-7-8-10 – Mawia HL Apr 19 '17 at 07:23
  • PHP error log says: "PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files\PHP-7.1.3\ext\php_memcache.dll' - %1 is not a valid Win32 application." ... I've tried every DLL I can find and none work. – user4496950 Apr 19 '17 at 08:12
  • This is an installation problem more than a programming one. You might want to try [Server Fault](http://serverfault.com). – tadman Apr 19 '17 at 18:32

0 Answers0