So does it ever let you in? Is this an intermittent problem? If it's intermittent, it doesn't sound like it's PHP's fault, but rather Apache's fault, or the connection, or something else.
If you'd like to post your code, that would help us look for any coding errors. I'm not sure what information it would provide, but if you'd still like someone else to take a look at it, you can feel free to contact me (PM via the boards, AIM, or e-mail) and I'll see what I can poke around and find out.