Output of phpinfo() and php -i command totally different
I have wordpress running on LEMP stack. I had recently installed memcached module for handling sessions, but it threw some errors: in PhpMyAdmin and Wordpress Social Login - both used session_start which got disabled. I debugged this for several hours but no luck, so I decided to go back to disk based sessions (files) on our live site and continue with the debug on a development server.
I have uninstalled memcached from both PECL and DPKG. I updated php.ini settings accordingly and restarted php5-fpm and nginx services, but the errors did not go away.
According the nginx log “PHP cannot find save handler: memcached”
phpinfo() in the front end tells me that
a) memcache.ini additional file is being loaded from /etc/php5/fpm/conf.d/
b) memcache support is enabled
c) session save_handler is memcached
The ini file does not exist. The memcache and memcached packages have been removed and the session savehandler is set to files along with a savepath. The output of php5-fpm -i confirms all this.
What is happening? I suspect PHP5-FPM pool configurations or something..
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.