I'am currently writing a small app in C that should display a timetable, on a Solaris 10/Apache Sun server. The app should open a HTML skeleton, syntaxicaly replace a couple of placeholders and display the content. If the skeleton could not be found, an HTML error message is sent back to the user. I compile, and test it: runs #1. I move my executable in the cgi-bin folder and invoke it with my browser and .. bang!: HTTP 500. The error_log shows: malformed header from script. Bad header=<HTML>: /apache/web/cgi-bin/timesheet.cgi The HTTP-500 arises mostly when Content-type:... is missing, or if there's not empty line before the text. However, in my case, when I invoked it manually: /apache/web/cgi-bin/timesheet.cgi .. it worked perfectly, displaying it could find its skeleton: Content-type: text/html <html> [... Error message ...] </html> So what was going on? I replaced the binary by a small script displaying the error message, hit it with my brower ... and it...
Parce que j'aime bien la musique. Parce que je trouve bien les instruments. Parce qu'il y a beaucoup de boutons. Et que j'aimerais bien jouer du piano.