Skip to main content


 
Hmm I tried to configure Nextcloud on my Debian system with memcached like in the documentation https://docs.nextcloud.com/server/16/admin_manual/configuration_server/caching_configuration.html

'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Memcached',
'memcached_servers' => [
     [ 'server0.example.com', 11211 ],
     [ 'server1.example.com', 11211 ],
     [ 'server2.example.com', 11211 ],
 ],


But only with a localhost in it
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Memcached',
'memcached_servers' => [
     [ 'localhost', 11211 ],
 ],

But this leads all the time to a server error

When I changed the configuration to

  'memcache.local' => '\OC\Memcache\Memcached',
  'memcache.distributed' => '\OC\Memcache\Memcached',
  'memcached_servers' => array(
               array('localhost', 11211),
                    ),


It worked.

Somebody should review this documentation. Or am I wrong? @Björn Schießle 🌍 🇪🇺

#Nextcloud #Configuration #Documentation

What version of PHP are you running? Short array syntax has been added in PHP 5.4. What was the error you got?

Oh, I didn't see the difference in the config value for the key memcache.local, maybe that was the issue since you're defining a localhost Memcache instance?

Nope I was configuring according to the nextcloud documentation as I wrote above. But this configuration doesn't work what I as well mentioned there.
And the Nextcloud documentation is recommending PHP 7.2 . So I don't think that I made a mistake. I think the documentation is wrong aka maybe outdated.
This entry was edited (1 month ago)

I agree. My previous comment didn't imply you made a mistake, just that the short array style wasn't the source of the issue like I initially thought.