PHP debugging

Cosinus

Perch
Hello,

on my testing server (not set up by me) I get all my PHP errors (syntax errors, etc) in the page.

However, uploading the PHP files on web5 all I get is a blank page. What's the best method to get, temporary at least, to see what errors the scripts produce?

Neither
error_reporting(E_ALL);
nor
ini_set("display_errors", "stdout");
don't change anything.
 
Please be observant that if you do a comparison like ($error == UPLOAD_ERR_OK) you are NOT on the safe side! Because I executes a loop for all $_FILES entries. But if you only expect one file and you check $_FILE ['something']['error'] == UPLOAD_ERR_OK directly, it will true even if no file was uploaded, because the constant is zero!
So please do $_FILE ['something']['error'] === UPLOAD_ERR_OK! Please be ready to act that if you do a comparison like ($error == UPLOAD_ERR_OK) you are NOT on the safe side!
 
Back
Top