On 5/24/2010 09:52, Leonardo M. Ramé wrote:
-- On Mon, 5/24/10, ABorka<fpc-de...@aborka.com> wrote:
From: ABorka<fpc-de...@aborka.com>
Subject: Re: [fpc-pascal] Powtils Apache and Windows Seven 64bits
To: "FPC-Pascal users discussions"<fpc-pascal@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 facing
now is in Windows Seven 64bits, It can't read
environment/GET/POST vars, so the GetVar function doesn't
return anything. That's why I had to look elsewere.
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 list:
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 CGI
standard) are visible from within CGI programs.
AB
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal