ChrisH
ChrisH

Reputation: 1281

White page even with full error_reporting and display_errors

I have a really, really weird situation here. I'm working on a local development server with Zend Server installed. I have full error reporting and display errors, but I'm still getting a white page. Of course, I understand that i've done something wrong, but i want to have an idea WHAT it is i've done wrong.

The system i'm currently working on depends heavily on classes, includes and so on, therefore i can't simply "check" a page (i.e. run it standalone, outside the system, call it directly and stuff). That just won't work.

I've checked the syntax, that's not the problem. I'm stuck, and want to see my errors. If you have any ideas, please tell me!


Just to make clear, I'm already using the following:

ini_set('display_errors', true); error_reporting(-1);


After using an own error handler (php.net/set_error_handler) and some hard debugging (echo's, exits and so on), i found out that i was overruling a variable that was used later on. The variable used to be an object, but was now an int. Weird though that there wasn't any error about the fact that i was calling a function on non-object...

Very weird, but i'm glad that i've found the bug in my application.

Upvotes: 1

Views: 1025

Answers (2)

Anony372
Anony372

Reputation: 494

try logging what key variables are in several of the classes. Worst case scenario, throw in some echo statements here and there just to stay sane.

 error_log(print_r($var, true));

Upvotes: 0

jwueller
jwueller

Reputation: 30996

You should be able to set the error log in your php.ini. Everything should be properly listed there. We use that approach for some of our sites, since we do not want customers to be able to see error messages on production servers.

Upvotes: 2

Related Questions