I get a lot of errors and warnings in my PHP code

if you get a lot of undefined errors about can't find files and assuming other files (they will look somewhat like below)

Notice: Undefined variable: HTTP_REFERER in (some path) on line 186
Notice: Undefined index: SCRIPT_URI in (some path)on line 187`

The likely cause is your web host has set default PHP warning level too high. To fix it put the following in the 'page prefix' section of the page

<?PHP 
error_reporting(E_ERROR); 
?>