I can't believe it is the db or anything with the MySQL because the board runs fine as well as all of the other hacks I have installed. Like you said, it is just one of those things that can't be explained on some boards. Mine seems to be one of them, I guess.
You script looks good. I'd be interested in taking a closer look at it when you get some more of the stuff added. Let me know if I can help in any way.