[fpc-pascal] Powtils Apache and Windows Seven 64bits
Leonardo M. Ramé
martinrame at yahoo.com
Mon May 24 20:35:23 CEST 2010
--- On Mon, 5/24/10, ABorka <fpc-devel at aborka.com> wrote:
> From: ABorka <fpc-devel at aborka.com>
> Subject: Re: [fpc-pascal] Powtils Apache and Windows Seven 64bits
> To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
> Date: Monday, May 24, 2010, 3:24 PM
> On 5/24/2010 09:52, Leonardo M. Ramé
> > -- On Mon, 5/24/10, ABorka<fpc-devel at aborka.com>
> >> From: ABorka<fpc-devel at aborka.com>
> >> Subject: Re: [fpc-pascal] Powtils Apache and
> Windows Seven 64bits
> >> To: "FPC-Pascal users discussions"<fpc-pascal at lists.freepascal.org>
> >> Date: Monday, May 24, 2010, 1:48 PM
> >> On 5/24/2010 09:02, Leonardo M. Ramé
> >> wrote:
> >>> Aldo, I know it has templates, the problem I'm
> >> now is in Windows Seven 64bits, It can't read
> >> environment/GET/POST vars, so the GetVar function
> >> return anything. That's why I had to look
> >>> Leonardo M. Ramé
> >>> http://leonardorame.blogspot.com
> >> Is this a reported problem? Can you create a bug
> report on
> >> this if it is a reproduceable error?
> > This is the problem with POWTILS.
> > For fpWeb, this is what I posted in Lazarus mailing
> > I created a basic example called 'cgiproject1'
> consisting of only an TFPWebModule's OnRequest method like
> this, with no action:
> > procedure TFPWebModule1.DataModuleRequest(Sender:
> TObject; ARequest: TRequest;
> > AResponse: TResponse; var Handled: Boolean);
> > begin
> > AResponse.Content := 'Hello';
> > Handled := True;
> > end;
> > Without environment vars, the result is this:
> > exception at 000000010003B5DC:
> > No REQUEST_METHOD passed from server.
> > If I set the environment var REQUEST_METHOD using "set
> REQUEST_METHOD=POST", or "GET", the result is this:
> > An unhandled exception occurred at $000000010001FC05
> > EWriteError : Stream write error
> > $000000010001FC05
> > $0000000100034C77
> > $0000000100037D54
> > $0000000100033DCA
> > $00000001000015DE main, line 13 of giproject1.lpr
> > It doesn't matter if I set QUERY_STRING and PATH_INFO,
> the result is the same.
> > Leonardo M. Ramé
> I am not sure what the exception problem might be, but you
> cannot just
> do a SET command in a command prompt for CGI programs.
> For CGI programs you need to pass global environment
> variables with
> Apache, it is not automatic. For example, in the Apache
> httpd.conf with
> a "PassEnv TEMP" or "SetEnv TEMP /pathtotmpdir" line so the
> web server
> passes this global environment variable to the CGI
> programs' local
> environment variables. Only these "manually" passed ones
> and the ones
> Apache sends (the CGI environment variables that are in the
> standard) are visible from within CGI programs.
I did this command line testing because I was trying to find out what was causing the problem, because my trivial example didn't work on Windows Seven 64, the same test in Linux works fine.
I'll come back to fpWeb in a couple of weeks from now, now I'm hurried to finish a small project, and I'll use FreeSpider for it.
Leonardo M. Ramé
More information about the fpc-pascal