Class 'Memcached' not found
-
Hi all, i have this error. Can someone help me. How i can install this in Laragon (full latest version).
Thanks.Whoops, looks like something went wrong.
1/1
FatalErrorException in MemcachedConnector.php line 52:
Class 'Memcached' not found
in MemcachedConnector.php line 52
-
@DonikaV: This link should help:
https://sourceforge.net/p/laragon/tickets/6/
-
i added this in my cache.php
if (!class_exists('Memcached')) { include ("memcached.php"); } // Different settings for local vs. stage/prod $memcachedServers = [ ['host' => env('MEMCACHED_HOST', '127.0.0.1'), 'port' => env('MEMCACHED_PORT', 11211), 'weight' => 100] ]; 'memcached' => [ 'driver' => 'memcached', 'servers' => $memcachedServers, ],
and now i have another error
RuntimeException in MemcachedConnector.php line 34:
No Memcached servers added.I started Memcached in Preference
-
@DonikaV :
Don't worry, you can do a quick fix by editing the file etc\php\pear\memcached.php
Update the getVersion and add a fake getMulti() function like this:public function getVersion() { return ['localhost:11211' => '1.4.5']; } public function getMulti() { //TODO }
Then, your memcached code should work.