[pmwiki-users] Best practice for config file

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 20 07:41:12 CST 2006


On Mon, Mar 20, 2006 at 09:31:09AM +0100, Jan Erik Moström wrote:
> 
> Could updating be made even simpler by moving all distribution files into one
> folder and all locally modified ones into another (for example two skins
> folders, in the local folder and one in the distribution) ...

This is an example of the "Waterbed Theory of Complexity", where 
making one item simpler just pushes the complexity somewhere 
else.  :-)

In this case, if we put skins in the local folder, then we have
to have another url variable that has to be configured in order
for browsers to be able to locate the skin files (graphics, CSS),
since $PubDirUrl won't be sufficient.  And we have to try to
configure the webserver so that the skin files in local/
are browser accessible without inadvertently giving access to
the PHP scripts.

So, the issue is not just whether something is part of the
distribution, but also if it needs to be directly accessible
by the webserver.  (There are other dimensions to this as well.)

>From an organizational perspective, the base model goes something
like this:

  * Any file that may need to be directly accessed by a browser
    belongs in pub/ .

  * Files that are part of the distribution go in scripts/ ,
    and can be protected from direct browser execution by using
    .htaccess or something similar.

  * Shared scripts that provide additional functionality belong
    in cookbook/ (also protectable).

  * Local customizations go in local/  (also protectable).

Pm




More information about the pmwiki-users mailing list