[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGI/ISAPI Programming with Delphi 4.0 (fwd)



John P Roy schrieb:
> 
> Ideas anyone?, reply to RBund@tee.toshiba.de
> 
> Later,
> John
> > From jroy@search.netrunners.com  Thu Nov 12 05:04:35 1998
> > X-UIDL: e64deb0de66b797eb28e808bfbb03ae1
> > Message-Id: <F733ABB2166FD211BFE20000F64641BC04A345@dus05.tee.toshiba.de>
> > From: "Bund, Ralf" <RBund@tee.toshiba.de>
> > To: "'pi3web@johnroy.com'" <pi3web@johnroy.com>
> > Subject: CGI/ISAPI Programming with Delphi 4.0
> > Date: Thu, 12 Nov 1998 11:03:44 +0100
> > Mime-Version: 1.0
> > X-Mailer: Internet Mail Service (5.5.1960.3)
> > Content-Type: text/plain
> >
> > Hi Guys,
> >
> > I'm trying to create the CGI/ISAPI applications with Inprise Delphi 4.0
> > Web Server Support functions. I'm able to create CGI as well as ISAPI.
> > The sample applications coming with Delphi running fine with IIS 4.0.
> > When I try them on Pi3Web Server they don't run. Starting CGI
> > applications simply result in error message:
> >
> > 500 Internal Server Error
> > The server encountered an internal error while processing this request.
> > The following error messages were logged during this request:
> > [Thu Nov 12 09:51:07 1998 GMT] CGI: CGI program did not provide
> > 'Content-Type' header. Start of command line is
> > 'C:\Pi3Web\Cgi-Bin\project1.exe '.
> >
> > ISAPI applications don't give any result at all. Everthing is shown is
> > an empty browser window.
> >
> > Do you have any idea how to proceed??
> >
> > Best regards,
> >
> > Ralf Bund
> >
> > e-mail:       RBUND@TEE.TOSHIBA.DE
> >
> >
The problem is solved:

The solution:
1.) Open project-source code
2.) change
    Application.Initialize;
    Application.LoadForm(...);
    Application.Run;
    
    into
    CGIApp.Application.Initialize;
    CGIApp.Application.LoadForm(...);
    CGIApp.Application.Run;

for a CGI-application. for a ISAPI or WINCGI-application look in the
uses part of the project source for the correct unit name.

The reason:
Borland (Inprise). They defined new TCGIApplication etc. components
and declared additional global 'Application' variables for it. Due
to the TWebModule, the web-database compontent, the original 'forms'
unit is implicit included. The compiler has to decide to use one of
the global 'Application' variables - he takes the wrong one.

Why IIS works?
I believe IIS doesn't check the response of a CGI for correct HTTP-
syntax. This server would play any *.exe or *.bat file. Possibly
the Borland people checked their CGI-demo with IIS?

However, when they work, the Delphi-Internet components are real cool
stuff for CGI or ISAPI development with database connectivity.
Unfortunately only available in Delphi Client/Server edition.
-- 
with regards
Holger

---------------------------------------------------------
Holger 'Zimpel' Zimmermann    Contact me:
---------------------------------------------------------
Wendishain                    tel./fax company: on demand
Germany                       tel./fax private: on demand
---------------------------------------------------------
homepage: http://home.t-online.de/home/zimpel/
web server: surf to it from my homepage (online every
            Sunday 20:00-24:00 GMT, start shifted again)
e-Mail:     zimpel@t-online.de
--------------------------------------------------------