Memcached session not working?

Notice: This thread is very old.
dkorpar
Member | 132
+
0
-

I've posted all details here: https://github.com/…p/issues/110 2 days ago, but no response, so naybe I'll have more luck here:

This is in my config.neon

`session:
saveHandler: memcached
savePath: ‘localhost:22121’`

and I repetedly get this problem…

memcached config is ok, and this test code:

$m = new Memcached();
$m->addServer('localhost', 22121);

$m->set('int', 99);

sets key correctly

Dumping memcache contents
Number of buckets: 1
Number of items : 1
Dumping bucket 1 – 1 total items
add int 1 1479504298 2
99
I'm using php 7.0.12
and memcached 1.4.15

also basic php code:

ini_set('session.save_handler', 'memcached');
ini_set('session.save_path', 'localhost:22121');
session_start();
$_SESSION['BLA'] = 'heeey';

saved key to memcached without any issue and it's possible to read it, works correctly.

If I set config directly to php.ini and use nette session it works and session is correctly saved to memcached, but on other request session is lost (I think session id got changed, session data is still in memcached)

Last edited by dkorpar (2016-11-20 18:23)