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