Add error pages, fix error handling and PHP conf