0

To improve performance I changed my session.save_handler to memcache the problem is that $_sessions doesn't work.

in php

session_start();
$_SESSION['admin_referrer'] = $_SERVER['REQUEST_URI'];

... different page
session_start();
echo $_SESSION['admin_referrer']

if I change session.save_handler back to files, the above code works without a problem.

php.ini

session.save_handler = memcache
session.save_path = "tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"

I can comfirm from phpinfo(); that memcache is loaded.

echo "stats settings" | nc localhost 11211
STAT maxbytes 947912704
STAT maxconns 10240
STAT tcpport 11211
STAT udpport 11211
STAT inter NULL
STAT verbosity 0
STAT oldest 2255393
STAT evictions on
STAT domain_socket NULL
STAT umask 700
STAT growth_factor 1.25
STAT chunk_size 48
STAT num_threads 4
STAT stat_key_prefix :
STAT detail_enabled no
STAT reqs_per_event 20
STAT cas_enabled yes
STAT tcp_backlog 1024
STAT binding_protocol auto-negotiate
STAT auth_enabled_sasl no
STAT item_size_max 1048576
END
user2783132
  • 225
  • 1
  • 3
  • 16

0 Answers0