?
avatar tht2p
tht2p
4 Feb 2019

Steps to reproduce the issue:

  1. If Cache or Session Handlers are File and Database - connection is fine.
  2. Setting up php-memcache (also php-memcached) to connect via tcp (local, 11211) - connection is fine.
  3. It is impossible to even save the settings for connection via unix socket at Global configuration->System dash board (error: "invalid port" when trying to set port to 0 (zero)".
  4. If settings are adjusted manually directly in configuration.php - loss of connection and errors follow.

Expected result - to get connection with the following settings:

Memcache(d) Server Host = unix:///var/run/memcached/memcached.sock
The following path to socket: /var/run/memcached/memcached.sock setting up memcached (pecl)
Memcache(d) Server Port = 0 (zero)

Permissions to /var/run/memcached 0775

Memcached.conf:
-s /path/to/memcache.socket
-a 0777

Actual result - connection lost with the errors as follows:

  1. Warning: session_start(): Failed to initialize storage module: memcache (path: unix:///var/run/memcached/memcached.sock:0) in /path/www/test/libraries/joomla/session/handler/native.php on line 260
    Error: Failed to start application: Failed to start the session

or 2) Warning: session_start(): Failed to parse session.save_path (error at offset 0, url was '/var/run/memcached/memcached.sock:0') in /home/path/www/test/libraries/joomla/session/handler/native.php on line 260

Warning: session_start(): Failed to initialize storage module: memcache (path: /var/run/memcached/memcached.sock:0) in /home/path/www/test/libraries/joomla/session/handler/native.php on line 260
Error: Failed to start application: Failed to start the session

System information:

System: Ubuntu 18.04, Apache 2.4, php 7.3.1, Memcached server 1.5.12, php-pecl-memcache 3.0.9-dev, php-pecl-memcached 3.1.3).

Additional comments

avatar tht2p tht2p - open - 4 Feb 2019
avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Feb 2019
avatar tht2p tht2p - change - 7 Feb 2019
The description was changed
avatar tht2p tht2p - edited - 7 Feb 2019
avatar tht2p
tht2p - comment - 7 Feb 2019

First work around which worked for memcached pecl for sessions in /libraries/joomla/session/storage/memcached.php change port to 0 as follows:
$this->_servers = array(
array(
'host' => $config->get('session_memcached_server_host', 'localhost'),
'port' => $config->get('session_memcached_server_port', 0),
),
);
parent::__construct($options);
}
In admin dashboard - do not set any port (remove 11211 setup by default).
Connection with memcached server established for sessions.

avatar franz-wohlkoenig franz-wohlkoenig - change - 3 Mar 2019
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Mar 2019

@HLeithner can you please comment?

avatar HLeithner HLeithner - change - 3 Mar 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-03-03 14:34:39
Closed_By HLeithner
avatar HLeithner
HLeithner - comment - 3 Mar 2019

@tht2p I created a PR please test it

Closing issue because we have a PR #24073

avatar HLeithner HLeithner - close - 3 Mar 2019

Add a Comment

Login with GitHub to post a comment