Skip to content

Commit

Permalink
fix(admin): use correct params for memcache and redis server information
Browse files Browse the repository at this point in the history
  • Loading branch information
RiverVanRain committed Jul 17, 2023
1 parent 1a285b4 commit 6ee26b9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions docs/admin/performance.rst
Expand Up @@ -188,8 +188,14 @@ Uncomment and populate the following sections in ``settings.php``
$CONFIG->memcache = true;
$CONFIG->memcache_servers = array (
array('server1', 11211),
array('server2', 11211)
array (
'host' => 'server1',
'port' => 11211
),
array (
'host' => 'server2',
'port' => 11211
)
);
Optionaly if you run multiple Elgg installations but use ony one Memcache server, you may want
Expand Down
2 changes: 1 addition & 1 deletion views/default/admin/server/memcache.php
Expand Up @@ -15,7 +15,7 @@
}

foreach ($servers as $server) {
$memcache->addserver($server[0], $server[1]);
$memcache->addserver($server['host'], $server['port']);
}

if ($memcache instanceof Memcache) {
Expand Down
2 changes: 1 addition & 1 deletion views/default/admin/server/redis.php
Expand Up @@ -12,7 +12,7 @@
$redis = new Redis();

foreach ($servers as $server) {
$redis->connect($server[0], $server[1]);
$redis->connect($server['host'], $server['port']);
}

$password = elgg_extract('password', elgg_get_config('redis_options'));
Expand Down

0 comments on commit 6ee26b9

Please sign in to comment.