Posts Tagged ‘php’
Posted on September 23, 2007 - by Jordan H
PHP Session Purging
I’ve been trying to make a login script that purges the sessions database so that users will only stay inactive for 1 hour until they have to log in again. All seems to be well, but then it just doesn’t work.
This is the code which I have on every page:
$time = date("ymdHis");
$cutoff = $time-1000;
$sql = "DELETE FROM adminsessions WHERE time<'$cutoff'";
mysql_query($sql) or die(mysql_error());
It should log the user out after 10 mins of inactivity. Doesn’t seem to be doing that at the moment. Anyone got any ideas?
Posted on September 20, 2007 - by Jordan H
CMSing is bloody hard…
I’ve been working on a custom CMS for a new game development studio. I decided to use PHP’s Smarty Template Engine as it’d make the template system really easy to use. Nope, not at all. Spent 5 hours fixing problems that seemed to all come from the default config settings and leak into the functions and classes. It’s supposed to be an easy setup, not a guru’s job.
The CMS is modular, it uses modules so we can extend it really easily. We’re also trying to integrate a vBulletin forum and their Single User Login system for their games. What did I say, CMSs are easy? Hell no.
