the 500 internal server error is impossible to troubleshoot.
it is a generic error message that only means "an error has occurred"
we may be able to tell the real error for troubleshooting by turning error reporting on. add the following code at line 1:
once we know what the error is, we will be able to troubleshoot the cause.