On 5 Oct 1998 [EMAIL PROTECTED] wrote: > [In order for any reply to be added to the PR database, ] > [you need to include <[EMAIL PROTECTED]> in the Cc line ] > [and leave the subject line UNCHANGED. This is not done] > [automatically because of the potential for mail loops. ] > [If you do not include this Cc, your reply may be ig- ] > [nored unless you are responding to an explicit request ] > [from a developer. ] > [Reply only with text; DO NOT SEND ATTACHMENTS! ] > > > Synopsis: .exe cgi don't work--500 internal error > > State-Changed-From-To: open-feedback > State-Changed-By: [EMAIL PROTECTED] > State-Changed-When: Sun Oct 4 21:15:54 PDT 1998 > State-Changed-Why: > I just tried an exe cgi that was not wrapped in a bat > file and it worked great. Could you please try to reproduce > your error using 1.3.2. You should not have to wrap C cgi's > in bat files in order to get them to work..At least I can get > exe's to work directly with 1.3.2 > Thanks for using Apache > > here is my setting for the handlers
# To use CGI scripts: AddHandler cgi-script .cgi AddHandler cgi-script .exe AddHandler cgi-script .bat and, the same, if I have the URL as "http://bonso/cgi-bin/a.exe?hihi=lolo" return as: Internal Server Error Premature end of script headers but, if I use "http://bonso/cgi-bin/a.bat?hihi=lolo" work fine and return: hihi >>hihi=lolo<< length is: 9 my script is a C++ program and use GNU compiler the program is == start == #include <stdlib.h> #include <stdio.h> void main() { printf("Content-type: text/html\n\n"); printf("<html><body>\n"); printf("<strong>hihi</strong><br>\n"); char *envstr; envstr = getenv("QUERY_STRING"); if (envstr == NULL) printf("it is null\n"); else printf(">>%s<<\n",envstr); printf("<br>length is: %d\n",strlen(envstr)); printf("</body></html>\n"); } === end === I am using Apache 1.3.2 (Win32) on a Windows 95 4.00.950.B machine thanks for your help : >
