End of script output before headers line 118

I’m not super familiar with CGI deployment, but I think I’ve seen it that 500 is common if your app is crashing. Have you got it running locally? Have you deployed standalone? Could I interest you in Lifeboat?