[horde] Storing session in memcached (Horde Webmail 5.2.22)

mailing lists listas.correo at yahoo.es
Fri Nov 3 10:30:38 UTC 2017


I found it!
the problem is with the default installation of apache in centos 7
# grep -ri session /etc/httpd/
/etc/httpd/conf.d/php.conf:php_value session.save_handler "files"
/etc/httpd/conf.d/php.conf:php_value session.save_path    "/var/lib/php/session
this values are picked by php applications overwriting the values in php.ini
 

    On Thursday, November 2, 2017, 4:33:00 PM GMT+1, listas.correo <listas.correo at yahoo.es> wrote:  
 
 Hi,

I'm trying to use memcache for horde sessions but it seems that I 
configured something incorrectly because it ignores my configuration.

This is what I have tried:

configure php handle and path to memcached instances:

# grep -e ^session.save_handler -e ^session.save_path /etc/php.ini 
session.save_handler = memcache
session.save_path = "tcp://127.0.0.1:11211,tcp://127.0.0.1:11212"

enable failover and redundancy:

# grep -e ^memcache.allow_failover -e ^memcache.session_redundancy 
/etc/php.d/memcache.ini
memcache.allow_failover=1
memcache.session_redundancy=3

configure conf.php:

# grep session /var/www/html/config/conf.php
$conf['session']['name'] = 'Horde';
$conf['session']['use_only_cookies'] = true;
$conf['session']['timeout'] = 0;
$conf['session']['cache_limiter'] = 'nocache';
$conf['session']['max_time'] = 72000;
$conf['sessionhandler']['type'] = 'Builtin';
$conf['sessionhandler']['hashtable'] = false;

the 'Builtin' type is described as:

"If you have configured a custom session extension in php.ini (such as 
native memcache sessions) then you should use this option. Horde doesn't 
force PHP to use the file-based session handler, so your php.ini 
settings settings will be deferred to."

so I understand that it is the correct value.


and check current values with test.php, but as you can see the "Local 
Value" column (the one used by horde) shows the "file" handle whilst the 
"Master value" shows the value configured in php.ini.

why the "Local value" isn't changed to memcache?





# elinks -dump http://localhost.localdomain:8088/test.php?mode=phpinfo
[...]
                                     memcache

             memcache support                          enabled
    Version                             3.0.8
    Revision                            $Revision: 329835 $

                  Directive                  Local Value       Master Value
    memcache.allow_failover               1                 1
    memcache.chunk_size                   32768             32768
    memcache.compress_threshold           20000             20000
    memcache.default_port                 11211             11211
    memcache.hash_function                crc32             crc32
    memcache.hash_strategy                consistent        consistent
    memcache.lock_timeout                 15                15
    memcache.max_failover_attempts        20                20
    memcache.protocol                     ascii             ascii
    memcache.redundancy                   2                 2
    memcache.session_redundancy           2                 2

[...]

                                     session

    Session Support                        enabled
    Registered save handlers               files user memcache
    Registered serializer handlers         php php_binary wddx

Directive                Local Value                     Master Value
session.auto_start               Off                         Off
session.cache_expire             180                         180
session.cache_limiter            nocache                     nocache
session.cookie_domain            localhost.localdomain       no value
session.cookie_httponly          On                          Off
session.cookie_lifetime          0                           0
session.cookie_path              /                           /
session.cookie_secure            Off                         Off
session.entropy_file           /dev/urandom              /dev/urandom
session.entropy_length           32                          32
session.gc_divisor               1000                        1000
session.gc_maxlifetime           1440                        1440
session.gc_probability           1                           1
session.hash_bits_per_character  5                           5
session.hash_function            0                           0
session.name                     Horde                       PHPSESSID
session.referer_check            no value                    no value
session.save_handler             files                       memcache
session.save_path                /var/lib/php/session       
tcp://127.0.0.1:11211,tcp://127.0.0.1:11212
session.serialize_handler        php                         php
session.upload_progress.cleanup  On                          On
session.upload_progress.enabled  On                          On
session.upload_progress.freq     1%                          1%
session.upload_progress.min_freq 1                           1
session.upload_progress.name     PHP_SESSION_UPLOAD_PROGRESS 
PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix   upload_progress_     upload_progress_
session.use_cookies              On                          On
session.use_only_cookies         On                          On
session.use_trans_sid            0                           0





  


More information about the horde mailing list