Refactor plus SSL and PHP Error Reporting