When Display_errors is off in php.ini it is hard to see where the bug is!
While you are working in server where display errors are off you can add this code on top of the page and it will show whats going on in your php code.
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);
I prefer to use this code through a function or include file and when you are done you can close or disable.
overriding couple of allowed php.ini variable on individual website.