0

I have recently moved my site to EE5 and I am trying to setup memcached caching. My host has setup memcache and the php extension and its listed in php info. My hosts has given me these details

 array(
'host' => '/tmp/memcached.sock',
'port' => 11211,
'weight' => 1,
)

and I have added them to the config file like this

$config['memcached'] = array(
  array(
    'host' => 'tmp/memcached.sock',
    'port' => 11211,
    'weight' => 1,
  )
);

However, when I select 'Memcached' as my caching driver, EE displays the error message "Cannot connect to Memcached, using File driver instead".

I also saw in the EE docs that you add the server ip or local host to the host section but that didnt work either memecached config overrides

What is the correct syntax for my config file to get this to work?

0

you have missed / before tmp folder in your config. So config will be like this:

$config['memcached'] = array(
  array(
    'host' => '/tmp/memcached.sock',
    'port' => '0',
    'weight' => 1,
  )
);
| improve this answer | |
  • Yes I noticed that but that is not the answer as its still not working – bhackett Jul 26 '19 at 14:57
  • do you know what ext your server is using - memcached or memcache? – Max Lazar Jul 26 '19 at 16:31
  • its using memcached – bhackett Aug 6 '19 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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