This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-compiled CGI + Windoze Apache = Error 500


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]