You are not logged in.
I set memcache and set up a service file like this:
[Unit]
Description=Memcached Daemon
After=network.target
[Service]
User=memcached
# Remove '-l 127.0.0.1' to listen on all addresses
EnvironmentFile=/etc/conf.d/memcached
ExecStart=/usr/bin/memcached $MEMCACHED_ARGS
Restart=always
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
MemoryDenyWriteExecute=yes
[Install]
WantedBy=multi-user.target
File /etc/conf.d/memcached:
MEMCACHED_ARGS="-l 127.0.0.1 -p 10000 -o modern -t 1 -v"
And simple php code:
ini_set('session.save_handler', 'memcache');
ini_set('session.save_path', '127.0.0.1:10000');
session_start();
And see this warning:
Warning: session_start(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/i/project/counter.php on line 6
Warning: session_start(): Failed to read session data: memcache (path: 127.0.0.1:10000) in /home/i/project/counter.php on line 6
Help make it work!
Offline
I apologize, I confused and installed php-memcache instead of php-memcached, now everything works
Last edited by prosvetlyonniy (2019-01-09 11:14:00)
Offline