Included Bugs

I spent the better part of a day and a half beating the keyboard with my head over a very frustrating problem: “WTF! Where’s that cookie I set?!” in a PHP project that I was working on.

See, the problem came from abstracting all the cookie related functions to a separate PHP file. Easier to maintain, right? Only if one remembers to place a “require_once” call before making the function call! Together with disabling error out put on the server, and not setting up proper debugging, lead to a lot of wasted time.

Once I realized what happened, I had to physically smack myself on the forehead!

The lesson here is make sure you double check all you includes and requires, that and don’t code sleepy!

Leave a Reply

Close Menu