I am using Apache, PHP 5.4 and Cakephp 2.4. recently I am getting random issues with my session.
My queries are based on variables stored in the session and once every 10-15 pages I get a critical error saying that the mysql query failed because it cannot find the field in the database. This field name is stored in the session that's why I suspect it being an issue with my session settings. Moreover, when I get an error and refresh the page 2 or 3 times it finally loads and the session somehow "restores" It is an e-commerce application and shopping cart is saved in the session. Even if an item is in the shopping cart, I get that error and refresh the page, shopping cart is still saved fine so the session is not completely lost. It seems like it almost disappears for few seconds.
My cake is set up like:
Configure::write('Session', array(
'defaults' => 'php'
));
In my php.ini I already changed
session.save_handler = memcache
to
session.save_handler = files
But it didnt help. I also get that issue when I put a link directly in my url and there is no redirect to it, so it is not an issue with redirects losing a session that was already discussed on this forum before.
Any ideas where else I should look?