[pmwiki-users] Re: Re: Re: Using AllRecentChanges as a shared page between fields
jo at durchholz.org
Sun Jul 24 17:10:31 CDT 2005
Patrick R. Michaud wrote:
> On Sun, Jul 24, 2005 at 06:10:05PM +0200, chr at home.se wrote:
>>> The reason I didn't create a separate directory for this is that
>>> it means creating another webserver-writable directory that has
>>> to be protected from browsers somehow, and I felt things were
>>> generally simpler if all of the protected files were kept in one
>>> place rather than multiplying it to two or more.
>> For these temporary files, I can't see why you don't simply use
>> /tmp? Isn't that (or something similar) available in windows?
> 1. Because /tmp isn't writable under safe_mode.
That's the argument I agree with.
> 2. Because cleanup processes sometimes come in and destroy the files
> in /tmp, which isn't always helpful to PmWiki.
"not always helpful" would be an understatement, but the cleanup
processes don't delete files that haven't been touched in days. I'd
assume that PmWiki doesn't need its temporaries around for such a long
time - or does it?
> 3. Not every OS has /tmp. In the case of Windows, PmWiki has to
> guess (a) if it's running under windows and (b) where the "temp
> directory is actually located.
The One True Way to detect the name of the temporary directory is to
inspect the environment variable $TMP, both under Windows and Unix(oids).
On my server, hardcoding /tmp as the temporary directory would actually
break. I'm got a PAM module installed that sets up a separate directory
for each process in /tmp. This eliminates race conditions that are
otherwise commonplace around the creation of a temporary file. I'm
pretty sure my server isn't the only one that has this or a similar
policy in place...
More information about the pmwiki-users