We’ve been using Opencart for a number of large online shop’s recently, its much more scalable and has much cleaner code than other shopping cart packages available.
There are a number of things it does so much better than the rest, stuff like different pricing groups, one page checkout etc.
However, there are a few things it doesn’t do too well – one of which was an issue with the TMP directory on the server the sites are on continually getting filled up, to the point where it would stop anything database driven from working.
Now obviously this is a fairly big issue – as most websites nowadays are (or should be) database driven – so we tried various things to see if we could get it to stop filling up, all with no success.
Then our in-house opencart developer Olly noticed some php.ini files within the root, and the /admin folder of all opencart installations, and in these fields was this line;
session.gc_maxlifetime = 12000000;
This number is in seconds, so in hours that would be; 3,334 – which is 138 days!
I’m pretty sure these don’t need to be stored for so long, so if we change that to 3600 – which is exactly one hour – we’re pretty confident that this issue will no longer happen.
Leave a Reply