At the top of the script, put the following line. See if you get any errors:
PHP Code:
error_reporting(E_ALL);