delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | cshepard <throwaway_addr_12345 AT yahoo DOT com> |
Subject: | gcc-compiled CGI + Windoze Apache = Error 500 |
Date: | Sat, 1 Apr 2006 17:03:17 +0000 (UTC) |
Lines: | 31 |
Message-ID: | <loom.20060401T185645-466@post.gmane.org> |
Mime-Version: | 1.0 |
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: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 <stdio.h> 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |