Add right after:
PHP Code

<?PHP

the following line:
PHP Code
ini_set( "display_errors", true ); 
and then post the output here.

This will show all errors in the script rather then just showing the 500 error page.