This is the mail archive of the cygwin@cygwin.com 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]

RE: CGI & gcc


I don't know about that. This works for me.

#include <stdio.h>

int main()
{
    printf("Content-Type: text/html; charset=ISO-8859-1\n\n");
    printf("<html>\n<head>\n</head>\n<body>\n");
    printf("Hello World\n");
    printf("</body>\n</html>\n");

}

You obviously do have something wrong, but it isn't related to cygwin.


> -----Original Message-----
> From: Greg Hamilton [mailto:Hamilton@bblfm.com.au]
> Sent: Tuesday, April 17, 2001 12:42 PM
> To: Neil Lunn
> Subject: RE: CGI & gcc
> 
> 
> It's returning a valid header when executed from the command line.
> An invalid header would produce an error message from Apache.
> The problem is that the file is not executed.
> Instead the browser shows the download dialog and asks where 
> I want to save
> the file.
> Apache is setup to run .exe files in the cgi-bin directory.
> .exe files generated by other compilers work.
> This problem is specific to programs compiled with gcc and 
> requiring the
> cygwin1.dll
> 
> 
> 
> -----Original Message-----
> From: Neil Lunn [mailto:neillunn@gunz.com.au]
> Sent: Tuesday, April 17, 2001 12:39 PM
> To: 'Greg Hamilton'
> Cc: 'cygwin@cygwin.com'
> Subject: RE: CGI & gcc
> 
> 
> > -----Original Message-----
> > From: Greg Hamilton [mailto:Hamilton@bblfm.com.au]
> > Sent: Tuesday, April 17, 2001 11:30 AM
> > To: Neil Lunn
> > Subject: RE: CGI & gcc
> > 
> 
> My guess right now says that your *example* is not returning header
> information.
> 
> ie
> 
> $ ./hello
> Content-Type: text/html; charset=ISO-8859-1i
> 
> <html>
> <head>
> </head>
> <body>
> Hello Word
> </body>
> </html>
> 
> > 
> > 
> > >The system path and not the user path I hope. Have you 
> restarted the
> > >computer? You need to do this to pick up this change.
> > Yes
> > 
> > >Where I presume you have a /cgi-bin that is execute only and 
> > the execute
> > >permissions are set on your cgi executable.
> > huh ?
> > 
> > >Is apache built for Cygwin or is it a native Win32 build? 
> > Where did you get
> > >it from?
> > I'm using a native Win32 buid of Apache.
> > Originally all my scripts were in Python and I had no need 
> > for Cygwin but
> > I've run into something I can't do in Python that's a 
> > no-brainer in C. I
> > don't have a C compiler handy so I downloaded Cygwin to get GCC.
> > 
> > Here's the thing. I've assumed that a GCC compiled .exe file 
> > will run on any
> > Windows system provided that the Cygwin dll is available. ie. 
> > that it is not
> > necessary to have a full install of Cygwin on the machine 
> running the
> > program. Is this an incorrect assumption ?
> > 
> 
> ______________________________________________________________
> ____________
> Please Note :
> Only  the intended recipient is authorised to access or use 
> this e-mail.  If
> you are not the intended recipient,
> please delete this e-mail and notify the sender immediately.  
>  The contents
> of this e-mail are the writer's 
> opinion and are not necessarily endorsed by the Gunz Companies unless
> expressly stated.
> 
> We use virus scanning software but exclude all liability for 
> viruses or
> similar in any attachment.
> 

__________________________________________________________________________
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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