[pmwiki-users] Automatic Field-specific Cookie Prefix
Patrick R. Michaud
pmichaud at pobox.com
Thu Jan 19 12:28:03 CST 2006
On Wed, Jan 18, 2006 at 05:29:06PM -0700, H. Fox wrote:
> This line in each field's config.php will guarantee a unique
> $CookiePrefix string for each field in a farm:
>
> $CookiePrefix = substr($tmp = md5(__FILE__), 0, 5).'_';
>
> I tried to use something similar in the Light Skin's light.php script,
> but you can't set $CookiePrefix in skin.php for some reason...
Well, you *can* set $CookiePrefix, but it has little effect because
skin.php gets loaded very late in the configuration sequence --
typically after all of the modules that might be using $CookiePrefix
(and certainly after any recipes).
$CookiePrefix is one of those variables (like $ScriptUrl, $PubDirUrl,
etc.) that should be reserved for site administrators to set.
However, adding a line like the above into sample-farmconfig.php
sounds like a very good idea. :-)
Pm
More information about the pmwiki-users
mailing list