PHP upgrade - traps to watch
Archive - Originally posted on "The Horse's Mouth" - 2005-10-31 07:52:38 - Graham EllisDid you want a Perl or Python course that starts on a Sunday? Or to book an old course that starts way back on 31st December 1969?
Our new online booking system's been under test on our in-house server for a while, but it was this weekend it went live together with most of the rest of the site. Yes, we've tested code and tested it again, but there are always things (such as IP address recognition) that can only be emulated in testing and I expected (and still expect) a few funnies.
Tips / traps to watch ... "there, but for the grace of God, go I" you may say:
1. Don't have a variable in your $_SESSION array that's got the same name as a local variable. Configuration issue ... worked fine in house and caused problems at the ISP! Solution once I identified the problem, was as easy as renaming a local variable
2. If your server is in a different timezone to your test machine ... beware. That's what happened with all those course that, for a few minutes, were offered to start a day earlier. You see ... when it's 07:00 this morning in the UK, it's 11 p.m. last night in California!
Remember also ... all the standard PHP traps about register_globals, conflicting session names with other applications, and magic quotes. Yes, didn't fall for those ... just the slightly more obscure traps listed above.