PieFileStructure

File Structure

Unlike former versions, Pie now no longer uses hard-coded names to refer to its working directories and files, but offers freely configurable locations instead. This way, you could, for instance, use the same software library for multiple installations of Pie. You could also move some of the more sensitive files, such as the one that holds the user passwords, out of the web server's document root.

What follows is a description the default configuration of Pie's files (residing below the document root). You will find this file structure in itself looking strangely similar to the File Hierarchy Standard, the only reason for this being personal preference that grew over the years.

All variables given along with the respective location apply to the global configuration array

 $GLOBALS['yap'][<variable>]

Software Library

Pie's software library, that is, its collection of scripts and functions that do the actual work while handling user requests, resides in librarypath. This directory does not need to reside below the web server's document root, but can be placed virtually anywhere. (Read-only, default lib).

Pie is controlled and interacted with by a single PHP-script, pie.php, which should reside somewhere in the respective web server's document root. Still, you can use a customary tailored index file, index.html or index.php, to address it anywhere else.

Local Customization

Apart from pie.php, which holds Pie's central configuration, you primarily do your local customization of your site setup in static, read-only files that are included by the library at run-time. These files reside in custompath for arbitrary customizations, and localepath for all types of localized system messages and responses.

As quite so often, your site's overall graphical appearance is customized via CSS. Unlike all other Pie components, your site's CSS-directory must reside somewhere below the web server's document root, of course. Otherwise, the readers' HTTP-requests won't be able to retrieve its contents. You typically import CSS directives through one of your header files in custompath, but could also set the style within these header files themselves.

custompath/footline.php
Customizable PHP-script whose output is appended after the compilation of each page.
custompath/head.php
Header prepended to all pages at run-time.
custompath/mime.types
List of MIME-entities used to determine the type of yap_Binary files.
custompath/tail.php
Footer appended to all pages at run-time.
localepath
Mostly static files that contain specific response messages of the software library. If you would like to translate Pie into an other language, you will find all relevant files below this directory.

Working Directories

Pie depends on various working directories to function, all of them being directories for whom your web server process requires exclusive read/write permission.

filepath
Container for uploaded binaries. (default: var/bin)
lockpath
Container for temporary lock files that prevent pages from being edited and changed by more than one user at the same time. (default: var/lock)
pagepath
Container for compiled pages. (default: var/out)
runpath
Container for temporary user session files. (default: var/run)
sourcepath
Container for page sources. (default: var/src)

Note that, unless specified with a leading slash, all file names are relative to the directory of Pie's multiplexer file (pie.php).

Run-time Library Files

userfile
File to hold all usernames and passwords. (default: var/etc/passwd)
logfile
Web access log file accumulating any page changes. Logging only takes place, if the variable logfile is set. (default: var/log/access)
[ Seite drucken ] [ nach oben ]
Zuletzt bearbeitet am 2005-07-21 05:28 von .
Ausgegeben in 0.0156 sec