This link has some good information on how to debug PHP scripts by writing objects to the PHP log file using
error_log. This is helpful — necessary, even — when you’re writing PHP code that doesn’t write directly to the browser.
The basic idea involves writing PHP code that looks like this:
Don’t leave the
true part out; if you do, the output will either go to your web browser or get lost somewhere else.