[pmwiki-users] using authuser in wiki farms
Patrick R. Michaud
pmichaud at pobox.com
Thu Mar 9 15:05:36 CST 2006
On Thu, Mar 09, 2006 at 01:43:26PM -0700, H. Fox wrote:
> > > In your field.php you can use
> > >
> > > $CookiePrefix = substr($tmp = md5(__FILE__), 0, 5).'_';
> > >
> > > It's not "automatic", but is it reliable?
> > [...]
> > Also, I think that the identifier needs to be based on
> > the runtime directory, not __FILE__, since some sites
> > use symlinks, aliases, and other tricks to make both
> > "index.php" and "pmwiki.php" work (as well as other
> > things); in such cases one field could easily end up
> > with different values for __FILE__ and thus
> > different cookies.
> __FILE__ is the field's local/config.php, not pmwiki.php, etc. so I
> don't think there's much risk of that (unless I'm missing something).
Oops, you're right. I was still thinking about automatically
computing the prefix from the pmwiki.php file, and not from
within a local/config.php. That would probably work reliably
from a uniqueness perspective (but the other caveats I gave
still apply, I think).
More information about the pmwiki-users