[ Index ]

PHP Cross Reference of DokuWiki




/inc/ -> farm.php (summary)

This overwrites DOKU_CONF. Each animal gets its own configuration and data directory. This can be used together with preload.php. See preload.php.dist for an example setup. For more information see http://www.dokuwiki.org/farms. The farm directory (constant DOKU_FARMDIR) can be any directory and needs to be set. Animals are direct subdirectories of the farm directory. There are two different approaches: * An .htaccess based setup can use any animal directory name: http://example.org/<path_to_farm>/subdir/ will need the subdirectory '$farm/subdir/'. * A virtual host based setup needs animal directory names which have to reflect the domain name: If an animal resides in http://www.example.org:8080/mysite/test/, directories that will match range from '$farm/8080.www.example.org.mysite.test/' to a simple '$farm/domain/'.

Author: Anika Henke
Author: Michael Klier
Author: Christopher Smith
Author: virtual host part of farm_confpath() based on conf_path() from Drupal.org's /includes/bootstrap.inc
License: GPL 2 (http://www.gnu.org/licenses/gpl.html)
File Size: 150 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 function


Functions that are not part of a class:

farm_confpath($farm)   X-Ref
Find the appropriate configuration directory.

If the .htaccess based setup is used, the configuration directory can be
any subdirectory of the farm directory.

Otherwise try finding a matching configuration directory by stripping the
website's hostname from left to right and pathname from right to left. The
first configuration file found will be used; the remaining will ignored.
If no configuration file is found, return the default confdir './conf'.

param: string $farm
return: string