by Emma Richardson.
I guess I would suggest undoing your PHP changes and get your site functional again. Then implement them one a time to find out which one is causing the issues.