[Lazarus] GetTempDir return impartial path

ABorka fpc-devel at aborka.com
Wed Jun 15 21:48:32 CEST 2011


...<SNIP>...
>>> I trying to use the GetTempDir, but I get only partial result, e.g.:
>>>
>>> \xampp\tmp\
>>>
>>> Was to be:
>>>
>>> C:\xampp\tmp\
>>>
>>> How to I get the complete path of temp dir of server (Apache)?
>
> GetTempDir returns the contents of the TEMP or TMP environment variable.
> If you get one without drive, it is what Apache passes to your CGI program.
...<SNIP>...
>
> Michael.

One note on that:
Apache does not pass the TEMP environment variable to CGI programs 
automatically, you need to tell it to do that in the Apache 
configuration file with a

PassEnv TEMP

(passes the TEMP environment variable as it is defined) or

SetEnv TEMP "c:/path/to/tmp/dir"

(sets the TEMP variable with the given value for the CGI program)

AB





More information about the Lazarus mailing list