Feb 26
Bug is known to be small, hides in corners and although is present everywhere, only makes itself known in odd circumstances. It flitters about in the air just above you where you don't expect it during those circumstances. At other times, it snuggles up in a corner, but is always present, waiting for the right opportunity. Considered to be armed and dangerous, as well as mischievous.

For the past year or so, I've been either trying to figure out what's wrong with a script I wrote, or whether or not I should rewrite it from scratch, or if possible, how to save the thing with odd workarounds. I thought, "there's got to be something wrong with my code". Every day after looking at it for hour after hour, not able to figure out what the cause of the problem was, I would think, "There's got to be some sort of bug in PHP!!!"...but when I'd think that, I'd try to do a search to find any other people who've had similar circumstances.

Well, poor coding practice (non-cached dynamic image) alongside some tricky $_SESSION management (and requirements) caused for some odd behavior. Session data was getting dropped on certain pages for no good reason. It worked fine up until a certain page and/or point. I'm not entirely sure what the error is caused by, but I do know that removing the dynamically created image stops the error and the session information continues to behave as would and should be expected. If anyone's interested in tackling the identification of this bug, I'd absolutely love some help, expert or otherwise. Unfortunately, as of right now, I'd have to share full code disclosure as I can't identify any smaller problem code than the full application with those certain settings turned on or off (as I just found the error); so I've really no idea what combination of code is required to recreate this error. I also do not have any debugging software strong enough to show what the stack trace/dump would look like during execution of the problem page.

...but man... 1+ year of being annoyed by this thing. For a long time, I thought it was the server configuration. I was damned sure of it. My test-bed development machine never rendered the dynamic image. ;-)

Posted by Brendon Kozlowski

Feb 3
So I started reading the CakePHP manual (after cheating and going through the example blog creation code, which is part of the manual). I'm learning it's much more powerful than I had originally thought. Like I said, I started reading the manual...then I realized just how long it was.

I'm now printing it out. It's used up about 1/3 of a ream of paper...and this printer has a duplexer, so it's printing on the front and back of the pages. The only complaint I have is that originally, the manual had chapter numbers, now the chapter sections use names only...unfortunately, the manual references chapters and chapter sections by the numerical association in some places. I'd also like a single PDF version of the whole thing (and that's saying a lot considering my hatred for PDFs). Otherwise, the manual's written very well, and in an informal writing style. Very easy to read. Even though it says you won't need a knowledge of MVC - not having a short background education in it might get you pretty confused.

Either way, it's my suggested reading for those of you looking for a framework. If you don't decide on CakePHP, it might help you understand how the other frameworks (could possibly) work.

Posted by Brendon Kozlowski

Feb 1
While I'm waiting for my database export/import to finish here at work, I figure I'd write about something I was thinking about late last night.

I constantly find myself rewriting old code with slight logic variations and taking too much time in doing so. I keep thinking, "If I make my functions general enough for all-purpose use, this won't happen," and yet it still does. I know I need to adopt (or create) a framework for my PHP development if I want to be decently productive. I've been waiting for the Zend Framework to reach the v1.0 milestone, but...

Continue reading "Best PHP Framework?"

Posted by Brendon Kozlowski