I’m writing this post because I’ve had this problem three times in the past two weeks. Each time it’s soaked up more hours of my life than it should.
The problem is that you load you script and nothing is output. Not even an error to tell you where you’ve gone wrong. This must be a PHP bug, but I guess we’ll just have to live with it for now, and try debug around it.
The weird thing is the error that’s causing the page to be blank might not even be a fatal error. Twice for me it was just a warning, which should definitely not halt the processing of the script.
Without a line number or even which include the error is on it’s pretty hard to find out what the problem is to start fixing it.
Ultimately what I end up doing each time is echoing a string, and on the next line exiting. Put this right after the opening <?php on the first line.
echo "got to here."; exit;
You should see the string output now. If you don’t it indicates that the hidden error is a fatal error, which will probably mean something to do with the syntax of your code, not the logic an undefined method or some such.
To fix that just carefully look through your code. If you don’t see any obvious problems then unindent everything. Now start indenting again if-by-if (or while-by-while, for-by-for, etc). Hopefully before the end of the file you’ll notice that you’ve had to indent twice, or you have left over braces. Delete or add as appropriate.
If you did see the “got to here.” text though, you can start moving those two lines down line by line. When you stop seeing the text you know the line above is the problem line. If you’re unfortunate enough to get to an include and it stops outputting, you’ll have to go through that too.
Once you’ve found the problem line, start debugging the relevant variables. You’ll likely find the problem there. (90% of all programming errors are variable related.)