Why does the error_reporting not display any errors even though nothing is being shown except the header?

The issue may be that the error_reporting level is set to not display certain types of errors, such as notices or warnings. To solve this, you can explicitly set the error_reporting level to display all errors by using error_reporting(E_ALL); at the beginning of your PHP script.

<?php
error_reporting(E_ALL);
// Your PHP code here
?>