Re: [cowiki-dev] Re: [Issue 219] coWiki always keeps temporary files in htdocs

"Daniel T. Gorski" <[email protected]> Mon, 12 Sep 2005 21:48:48 +0200
Newsgroups gmane.comp.php.cowiki.devel
Message-ID <20050912194848.GN23827@bantha>
On 12 Sep 12:22, Paul Hanchett wrote:

> >As I said above: We take the PHP temporary directory where PHP saves its
> >sessions to save our temporary data too - the PHP session directory is
> >always configured and writable for the httpd or the PHP process; and it's
> >always out of the access of an user agent.

> >Different coWiki instances on the same machine won't interfere(!), even if
> >they use the same direcory for sessions, because coWiki uses different 
> >names
> >for its tmp-files which are unique for each installation on the same host.

> This seems OK to me, except that the delete cache option just blindly 
> deletes everything in coWiki's temp directory, doesn't it?

Of course not :)

> How does coWiki separate it's files from other applications on the
> machine?

It mainly uses a part of a MD5 digest of the string that represents the path
to the current installation. Different installations have different paths ->
different MD5 digests.

Additionally there are few other information encoded in a temporary file
name, depending on what it is good for. This information could be "user
template", "user language" and the "user id" ... So an temporary could have
a name like this:

  coWiki_3C3E5B83_customdocrecent_876de65a_default_65535_en.iso-8859-1


> Will coWiki running on different processing threads experience a
> race condition?

It didn't yet, as different coWiki installation do not share anything (no
data, no code). 

regards dtg