[fpc-pascal] Powtils Apache and Windows Seven 64bits
fpc-devel at aborka.com
Mon May 24 20:24:17 CEST 2010
On 5/24/2010 09:52, Leonardo M. Ramé wrote:
> -- 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, 1:48 PM
>> On 5/24/2010 09:02, Leonardo M. Ramé
>>> 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é
>> 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);
> AResponse.Content := 'Hello';
> Handled := True;
> 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
> $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.
More information about the fpc-pascal