CGI - end of script output before headers

I wanted to try my hand trying at my first xojo web app. To start I placed a button on the form and wrote some code to make a label visible (Hello World). When testing everything works as described.

Next I did a build for a 32 bit Linux app and copied the xojo generated files to my hosts server (inmotionhosting). The files are in the sub folder of my domain named cgi-bin. I changed the permissions on the files to 755 as noted in documentation. When I try to load the cgi file I get an Error 500 - Internal Server Error.

I called support at inmotionhosting and they checked everything out. They confirmed that everything is setup correctly to run the cgi file and told me that it should work. When they checked the file they told me that the problem was in the cgi script itself. They said the problem was “end of script output before headers”.

What am I missing here? I seem to have a problem with what xojo has generated…

if you have a print or system.debuglog call somewhere, that can often make trouble as the debug messages comes before the framework sends headers.

Is it shared hosting or a dedicated or maneged server. Usually you cannot run a compiled applications on shared hosting servers.

My Hosting service assures me that the cgi should work on my hosting plan and that the problem is in the cgi file as noted. Any ideas with that in mind?

This is a very simple test App. One button one label and nothing else.

The cgi works, but do they allow executables (compiled applications)?