errors cause white page and no traces in logs
The Issue :
Errors in a php script cause white pages, no traces are found in the logs nor an开发者_开发百科ywhere
The Story (debug steps) :
I'm supposed to debug an outdated project, but it seems accessing any page would cause a blank/white page, no errors issued, and nothing in the apache error logs.
Most of the code I reviewed line by line can never cause such an issue (no syntax errors and no invalid variables or such).
I've removed '@' (used to disallow showing errors/debug info if an issue occurs to the function call) before function calls, installed an error_handler, checked if .htaccess is disallowing the view of the errors, enabled error reporting in both my php code and php.ini, yet nothing appears in the Apache nor PHP error logs.
The Solution :
Can be Found Here.
Best Regards !
Why don't you start by backing up the page. Making a new one and put a basic <?php echo "Hello world"; ?>
and see how you go.
Then break it by changing it to <?php ecKo "Hello world"; ?>
and see what happens. Start small, work your way up.
Have you tried creating a new blank page with nothing in it but an echo? Then you can build the page up slowly and see if you can find a problem.
Actually I've also had this problem when there's an error in the htaccess file, try removing that
Solution :
The issue was caused by an outdated OpenID api library, still the reason why the script did not output errors nor log them is still unknown, I highly suspect deprecated functions and such.
精彩评论