500 HTTP status for PHP errors

This PR addresses #6852

Current status:

 | Web | Tracker
--- | --- | ---
Fatal error | 200 | 200
PHP error | 200 | 200

With this PR:

 | Web | Tracker
--- | --- | ---
Fatal error | 500 | 500
PHP error | 500 | 200