Fixed Error reporting in PHP scripts