delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/25/18:10:08

Date: Thu, 25 Nov 1999 22:57:20 +0100
From: Teun Burgers <burgers AT ecn DOT nl>
Subject: Re: is there any cgi library for djgpp?
To: djgpp AT delorie DOT com
Message-id: <383DB0C0.6B76097B@ecn.nl>
X-Envelope-to: djgpp AT delorie DOT com
MIME-version: 1.0
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
References: <Pine DOT SUN DOT 3 DOT 91 DOT 991125174704 DOT 14597A-100000 AT is>
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:

> On Tue, 23 Nov 1999, azuaje wrote:
> 
> > I need to write cgi programs in C or C++ (preferably in C).
> > I wonder if there is any cgi
> > library for djgpp.
> 
> Compiling CGI programs with DJGPP is not a good idea at all: most
> probably the resultant executable won't work.  The problem is that DJGPP
> produces DOS programs, which are run by Windows in a separate Virtual
> Machine.  Since the HTTP server, like any Windows program, runs in the
> System VM it needs to employ special tricks to redirect standard input
> and output from a DJGPP program.  Alas, most Windows servers don't
> bother to employ these tricks.

I disagree! I used Laszlo Molnars perl 552b port with the
Windows version of Apache to run CGI scripts. This simply works.
Apache does get the standard output of the perl script.
You *do* have to use a trick to get hold of the standard error.
Instead of

#!c:/djgpp/bin/perl

you must use something like

#!c:/djgpp/bin/redir -ea c:/logs/cgi_error.txt c:/djgpp/bin/perl.

Teun

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019