Running an application using php 5.4 on AWS using the Amazon Linux.
PHP version is PHP 5.4.28. memcache lib installed from the AWS repo is php54-pecl-memcache-3.0.8-1.11.amzn1.x86_64
I have verified that php is using /etc/php.ini:
[[email protected]]# php -i | grep Config
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
The setting show that I should be using memcache:
[root@ip-10-40-17-119 etc]# grep "^session.save" php.ini
session.save_handler="memcache"
session.save_path="tcp://<elasticache-endpoint>:11211"
[root@ip-10-40-17-119 php.d]# php -i | grep session.save
session.save_handler => memcache => memcache
session.save_path => tcp://<elasicache-endpoint>:11211?persistent=1&weight=1&timeout=1&retry_interval=15 => tcp://<elasticache-endpoint>:11211?persistent=1&weight=1&timeout=1&retry_interval=15
I can telnet from the box to the end point & port and connect properly, so the instance is able to connect to the memcached server.
Things that we have tried:
- I have removed the tcp:// from the php.ini file, and that made no difference - sessions are still getting saved in files.
- We have changed from session.save_handler="memcache" to session.save_handler="memcached"
- each time we make a change, we stop the httpd server, and then start it again
- we have even tried rebooting the servers
Regardless of what we've tried, sessions are stored on disk to /var/lib/php/sessions. Is there something I'm missing, or is this a known 5.4 or AWS issue?
memcached
as handler instead ofmemcache
? – Ugariticmemcached
in the php.ini for sessions andmemcache
for the legacy PHP code. That's why I said it won't affect your PHP code. – Ugariticphp -i
? Try looking inphpinfo();
which php.ini is being used. – Vehicle