X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: cshepard Subject: gcc-compiled CGI + Windoze Apache = Error 500 Date: Sat, 1 Apr 2006 17:03:17 +0000 (UTC) Lines: 31 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com I compile the following code thusly: gcc -o hw.cgi hw.c #include int main(void) { printf("Content-type: text/html\n\n"); printf("HW"); exit(0); } Resulting permissions are 777. The hw.cgi runs fine from both bash and DOSe shells, but Apache/2.0.55 (Win32) produces a 500 Internal Server Error. The log just says the usual "premature end of script headers". Sitting next to hw.cgi, in the same directory, I have hw.py (chmod 777), and it works fine under Apache (ergo there are no directory ExecCGI or aliasing problems): #!c:/Python24/python.exe print "Content-type: text/html\n\n" print "HW" My httpd.conf says: AddHandler cgi-script .cgi .pl .py .rb .exe Do I need to link to some special lib to get hw.cgi to run as a CGI script? Or, as I suspect, is there something special Apache needs? Thanks in advance. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/