You could try adding the line
ini_set("log_errors", 1);
at the top of your script. It seems to turn on error logging on xo2 . After you get everything working, you might think about turning logging off.
You can add
ini_set("display_errors", 1);
to have the errors displayed BUT a) it is...