# Module of TWiki Collaboration Platform -*-Perl-*- # # This is the configuration file for TWiki, usually held in 'lib' directory. # # See 'setlib.cfg' in 'bin' directory to configure non-standard location # for 'lib' directory or Perl modules. # # Copyright (C) 1999-2004 Peter Thoeny, peter@thoeny.com # # For licensing info read license.txt file in the TWiki root. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details, published at # http://www.gnu.org/copyleft/gpl.html # # Notes: # - Latest version at http://twiki.org/ # - Installation instructions in $dataDir/TWiki/TWikiDocumentation.txt # - Customize variables in TWiki.cfg when installing TWiki. # - Optionally create a new plugin or customize DefaultPlugin.pm for # custom extensions of rendering rules. # - Upgrading TWiki is easy as long as you only customize DefaultPlugin.pm. # - Variables that can be accessed from topics (see details in # TWikiDocumentation.html) : # %TOPIC% name of current topic # %WEB% name of current web # %SCRIPTURL% base TWiki script URL (place of view, edit...) # %SCRIPTURLPATH% like %SCRIPTURL%, but path only (cut protocol and domain) # %SCRIPTSUFFIX% script suffix (empty by default, '.pl' if required) # %PUBURL% public URL (root of attachment URL) # %PUBURLPATH% path of public URL # %ATTACHURL% attachment URL of current topic # %ATTACHURLPATH% path of attachment URL of current topic # %DATE% today's date # %WIKIVERSION% tool version # %USERNAME% login user name # %WIKIUSERNAME% wiki user name # %MAINWEB% main web name (Main) # %TWIKIWEB% TWiki system web name (TWiki) # %HOMETOPIC% home topic name (WebHome) # %NOTIFYTOPIC% notify topic name (WebNotify) # %WIKIUSERSTOPIC% user list topic name (TWikiUsers) # %WIKIPREFSTOPIC% site-level preferences topic name (TWikiPreferences) # %WEBPREFSTOPIC% web preferences topic name (WebPreferences) # %STATISTICSTOPIC statistics topic name (WebStatistics) # %INCLUDE{...} # %SEARCH{...}% inline search # variables that need to be changed when installing on a new server: # ================================================================== # ---- Windows paths should normally be written as 'c:/foo' not 'c:oo' # ---- (which doesnt do what you may think it does). You can use '' # ---- without problems inside single quotes, e.g. 'c:oo'. # This file has been generated by UpgradeTwiki, taking values from # ../lib/Twiki.cfg where they could be found, and using # default values for the remainder. # # URL for TWiki host : (e.g. "http://myhost.com:123") $defaultUrlHost = 'http://engcvs'; # %SCRIPTURLPATH% : cgi-bin URL path for TWiki: $scriptUrlPath = '/twiki/bin'; # URL path to scripts used to render links. Change if using redirection to shorten URLs $dispScriptUrlPath = $scriptUrlPath ; # URL path to view script used to render links, relative to $dispScriptUrlPath $dispViewPath = "/view" ; # %PUBURLPATH% : Public data URL path for TWiki (root of attachments) : $pubUrlPath = '/twiki/pub'; # Public data directory (file path not URL), must match $pubUrlPath : $pubDir = '/home/httpd/twiki/pub'; # Template directory : $templateDir = '/home/httpd/twiki/templates'; # Data (topic files) root directory (file path not URL): $dataDir = '/home/httpd/twiki/data'; # Log directory for log files, debug and warning files. Default "$dataDir" : $logDir = $dataDir; # variables that might need to be changed: # ================================================================== # %SCRIPTSUFFIX% : Suffix of TWiki Perl scripts (e.g. ".pl") : $scriptSuffix = ''; # Regex security filter for uploaded (attached) files : # (Matching filenames will have a ".txt" appended) # WARNING: Be sure to update this list with any # configuration or script filetypes that are # automatically run by your web server $uploadFilter = '^(.htaccess|.*.php[0-9s]?|.*.phtm[l]?)$'; # Set ENV{"PATH"} explicitly for taint checks ( #!perl -T option ) : # (Note: PATH environment variable is not changed if set to "") # $safeEnvPath - safe operating system PATH setting for use by TWiki scripts. # # ---- Check notes for your operating system and use appropriate line as model # ---- Comment out unused lines (put "#" at start) and uncomment required line. # ---- All Windows paths use "/" not "\" for simplicity. # # As long as you use full pathnames for $egrepCmd and similar (below), # this path value is used only to find a shell (or cmd.exe) and by RCS programs # to find "diff". # # >> Unix or Linux - ensure "diff" and shell (Bourne or bash type) is found on # this path. # Separator is ":" # >> Windows: Cygwin Perl and RCS - ensure "diff" and "bash" found on this path. # Same format as Unix PATH, separator is ":" not ";". You must NOT use # "c:/foo" type paths, because ":" is taken as separator, meaning that # "c" is interpreted as a relative pathname, giving Perl "Insecure # directory in $ENV{PATH}" error on using "Diffs" link. # Separator is ":" # $safeEnvPath = "/bin";# Cygwin - uncomment, no need to customise # >> Windows: ActiveState Perl, with Cygwin RCS and PERL5SHELL set to # "c:/cygwin/bin/bash.exe -c". Same format as the normal Windows PATH, # separator is ":" not ";". Its best to avoid "c:/foo" type paths, # because in some cases these can cause a Perl "Insecure directory # in $ENV{PATH}" error on using "Diffs" link. Since this setting is # for Cygwin RCS, the best alternative is to convert "c:/foo" to # "/c/cygdrive/foo" - odd looking but it works! The Windows system directory # (e.g. /cygdrive/c/winnt/system32) is required in this path for commands # using pipes to work (e.g. using the "Index" link). # NOTE: Customise this path based on your Cygwin and Windows directories # Separator is ";" # $safeEnvPath = "/cygdrive/c/YOURCYGWINDIR/bin;/cygdrive/c/YOURWINDOWSDIR/system32"; # >> Windows: ActiveState Perl, with non-Cygwin RCS, OR no PERL5SHELL setting. # Windows PATH, separator is ";". The Windows system directory # (e.g. c:\winnt\system32) is required in this path for commands using pipes # to work (e.g. using the "Index" link). Must NOT use "/" in pathnames # as this upsets cmd.exe - single "\" is OK using Perl single-quoted string. # FIXME: needs testing, not currently recommended. # NOTE: Customise this path based on your RCS and Windows directories # Separator is ";" # $safeEnvPath = "c:\YOUR_RCSPROGDIR\bin;c:\YOURWINDOWSDIR\system32"; $safeEnvPath = '/bin:/usr/bin'; # Mail program used in case Net::SMTP is not installed. # See also SMTPMAILHOST in TWikiPreferences. # Windows: this setting is ignored, just use Net::SMTP. $mailProgram = '/usr/sbin/sendmail -t -oi -oeq'; # Prevent spambots from grabbing addresses, default "": # e.g. set to "NOSPAM" to get "user@somewhereNOSPAM.com" $noSpamPadding = ''; # Pathname of mime types file that maps file suffixes to MIME types : # For Apache server set this to Apaches mime.types file pathname. # Default "$dataDir/mime.types" $mimeTypesFilename = $dataDir.'/mime.types'; # RCS directory (find out by "which rcs") : $rcsDir = '/usr/bin'; # Store RCS history files in directory (RCS under content dir), default "0" # Dont change this in a working installation, only change when initially setting up a TWiki installation # You also need to create an RCS directory for each Web. TWiki will create RCS directories under pub for attachments historys. $useRcsDir = '0'; # Choice and configuration of Storage implementation # Currently select either: # RcsWrap - use RCS executables, see TWiki::Store::RcsWrap.pm for explanation of storeSettings # RcsLite - use a 100% Perl simplified implementation of Perl (NOT yet ready for production use) $storeTopicImpl = 'RcsWrap'; # NOTE: You might want to avoid c: at start of cygwin unix command for # Windows, seems to cause a problem with pipe used in search # Unix ls command : (deprecated since 01 Nov 2003) $lsCmd = '/bin/ls'; # Unix egrep command : $egrepCmd = '/bin/egrep'; # Unix fgrep command : $fgrepCmd = '/bin/fgrep'; #display Time in the following timezones (this only effects the display of times, all internal storage is still in GMT) # gmtime / servertime $displayTimeValues = "gmtime" ; # internationalisation setup: # ================================================================== # See the output of the "testenv" script for help with these settings. # Set $useLocale to 1 to enable internationalisation support for # 8-bit character sets $useLocale = 0; # Site-wide locale - used by TWiki and external programs such as grep, # and to specify the character set for the users web browser. The # language part also prevents English plural handling for non-English # languages. Ignored if $useLocale is 0. # # Locale names are not standardised - check "locale -a" on your system to # see what"s installed, and check this works using command line tools. You # may also need to check what charsets your browsers accept - the # "preferred MIME names" at http://www.iana.org/assignments/character-sets # are a good starting point. # # WARNING: Topics are stored in site character set format, so data conversion of # file names and contents will be needed if you change locales after # creating topics whose names or contents include 8-bit characters. # $siteLocale = 'en_US.ISO-8859-15'; # # Examples only: (choose suitable locale + charset for your own site) # $siteLocale = "de_AT.ISO-8859-15";# Austria with ISO-8859-15 for Euro # $siteLocale = "ru_RU.KOI8-R";# Russia # $siteLocale = "ja_JP.eucjp";# Japan # $siteLocale = "C";# English only, no I18N features # Site character set override - set this only if you must match a specific # locale (from "locale -a") whose character set is not supported by your # chosen conversion module (i.e. Encode for Perl 5.8 or higher, or # Unicode::MapUTF8 for other Perl versions). For example, the locale # "ja_JP.eucjp" exists on your system but only "euc-jp" is supported by # Unicode::MapUTF8, set $siteCharsetOverride to "euc-jp". Leave this as "" # if you dont have this problem. $siteCharsetOverride = "" ; # Set $localeRegexes to 0 to force explicit listing of national chars in # regexes, rather than relying on locale-based regexes. Intended for Perl # 5.6 or higher on platforms with broken locales: should only be set if # you have locale problems with Perl 5.6 or higher. $localeRegexes = 1; # If a suitable working locale is not available (i.e. $useLocale is 0), OR # you are using Perl 5.005 (with or without working locales), OR # $localeRegexes is 0, you can use WikiWords with accented national # characters by putting any "8-bit" accented national characters within # these strings - i.e. $upperNational should contain upper case non-ASCII # letters. This is termed "non-locale regexes" mode. # # If "non-locale regexes" is in effect, WikiWord linking will work, but # some features such as sorting of WikiWords in search results may not. # These features depend on $useLocale, which can be set independently of # $localeRegexes, so they will work with Perl 5.005 as long as # $useLocale is set to 1 and you have working locales. # # Using the recommended setup of Perl 5.6.1 with working locales avoids the # need to set these parameters. $upperNational = ''; $lowerNational = ''; # variables that probably do not change: # ================================================================== # RCS keyword handling: change this to "" only if you want TWiki pages to # include automatically-updated RCS ID keyword strings. Leave this as # "-ko" if you dont know what that means! Default setting ensures that # contents of TWiki pages are not changed by RCS. RcsLite always works in # "-ko" mode. $keywordMode = '-ko'; # Regex security filter for web name, topic name, user name : $securityFilter = '[\\*?~^$@%`"\'&;|<>-]'; # Default user name, default "guest" : $defaultUserName = 'guest'; # Deprecated, replaced by %WIKITOOLNAME% preferences variable : $wikiToolName = 'TWiki'; # Deprecated, here for compatibility : $wikiHomeUrl = 'http://engcvs/twiki'; # Site Web.Topic name, e.g. "Main.TokyoOffice". Default "" : $siteWebTopicName = ''; # %MAINWEB% : Name of Main web, default "Main" : $mainWebname = 'Main'; # %TWIKIWEB% : Name of TWiki system web, default "TWiki" : $twikiWebname = 'TWiki'; # Pathname of debug file : $debugFilename = $dataDir.'/debug.txt'; # Pathname of warning file. Default "$logDir/warning.txt" : # (no warnings are written if empty) $warningFilename = $dataDir.'/warning.txt'; # Password file format/encoding method : # htpasswd:plain, htpasswd:crypt, htpasswd:md5 (currently unsupported), # htpasswd:sha1, htdigest:md5, none: #default htpasswd:crypt; $htpasswdFormatFamily = "htpasswd" ; # Pathname of user name/password file for authentication : $htpasswdFilename = $dataDir.'/.htpasswd'; # Authentication "realm" (must be the same as in # password file, MUST NOT contain colons): $authRealm = "Enter your WikiName. (First name and last name, no space, no dots, capitalized, e.g. JohnSmith). Cancel to register if you do not have one." ; # Pathname of log file : $logFilename = $dataDir.'/log%DATE%.txt'; # Pathname of remote users file that maps IP to user : $remoteUserFilename = $dataDir.'/remoteusers.txt'; # %WIKIUSERSTOPIC% : Name of users list topic : $wikiUsersTopicname = 'TWikiUsers'; # Pathname of WebUsers topic, used to map Intranet login name # (e.g. "fsmith") to Wiki name (e.g. "FredSmith") : $userListFilename = $dataDir.'/'.$mainWebname.'/TWikiUsers.txt'; # Map login name to Wiki name, default "1", set to "0" for .htpasswd authenticated sites : $doMapUserToWikiName = "0" ; # %HOMETOPIC% : Name of main topic in a web, default "WebHome" : $mainTopicname = 'WebHome'; # %NOTIFYTOPIC% : Name of topic for email notifications, default "WebNotify" : $notifyTopicname = 'WebNotify'; # %WIKIPREFSTOPIC% : Name of site-level preferences topic, default "TWikiPreferences" : $wikiPrefsTopicname = 'TWikiPreferences'; # %WEBPREFSTOPIC% : Name of preferences topic in a web, default "WebPreferences" : $webPrefsTopicname = 'WebPreferences'; # %STATISTICSTOPIC% : Name of statistics topic, default "WebStatistics" : $statisticsTopicname = 'WebStatistics'; # Number of top viewed topics to show in statistics topic, default "10" : $statsTopViews = '10'; # Number of top contributors to show in statistics topic, default "10" : $statsTopContrib = '10'; # Statistics debugging - write invalid logfile lines to debug log $doDebugStatistics = '0'; # Show how many revision links, "0" for all, default "3" : $numberOfRevisions = '3'; # Number of seconds a topic is locked during edit, default "3600" : $editLockTime = '3600'; # Group of users that can use cmd=repRev # or that ALWAYS have edit powers (set $doSuperAdminGroup=1) $superAdminGroup = 'TWikiAdminGroup'; # flag variables that could change: # ================================================================== # values are "0" for no, or "1" for yes # Keep same revision if topic is saved again within edit lock time. Default "1" $doKeepRevIfEditLock = '1'; # Build $scriptUrlPath from $query->url parameter. Default "0". # Note that links are incorrect after failed authentication if "1" $doGetScriptUrlFromCgi = '0'; # Remove port number from URL. Default "0" $doRemovePortNumber = '0'; # Remove IMG tags in mailnotify. Default "1" $doRemoveImgInMailnotify = '1'; # Remember remote user by matching the IP address # in case REMOTE_USER is empty. Default "0" # (Note: Does not work reliably with dynamic IP addresses) $doRememberRemoteUser = '0'; # Change non existing plural topic name to singular, # e.g. TestPolicies to TestPolicy. Default "1" $doPluralToSingular = '1'; # Hide password in registration email $doHidePasswdInRegistration = '1'; # Remove ".." from %INCLUDE% filename, to # prevent includes of "../../file". Default "1" $doSecureInclude = '1'; # Log topic views to $logFilename. Default "1" $doLogTopicView = '1'; # Log topic edits to $logFilename. Default "1" $doLogTopicEdit = '1'; # Log topic saves to $logFilename. Default "1" $doLogTopicSave = '1'; # Log renames to $logFilename. Default "1". Added JET 22-Feb-01 $doLogRename = '1'; # Log view attach to $logFilename. Default "1" $doLogTopicAttach = '1'; # Log file upload to $logFilename. Default "1" $doLogTopicUpload = '1'; # Log topic rdiffs to $logFilename. Default "1" $doLogTopicRdiff = '1'; # Log changes to $logFilename. Default "1" $doLogTopicChanges = '1'; # Log search to $logFilename. Default "1" $doLogTopicSearch = '1'; # Log user registration to $logFilename. Default "1" $doLogRegistration = '1'; # Disable plugins. Set to "1" in case TWiki is non functional after # installing a new plugin. This allows you to remove the plugin from # the ACTIVEPLUGINS list in TWikiPreferences. Default "0" $disableAllPlugins = '0'; # Enable super-powers to $superAdminGroup members # see Codev.UnchangeableTopicBug $doSuperAdminGroup = '1'; # Here follow OS dependent settings... # $detailedOS = ($OS ? $OS : ($^O ? $^O : (require Config, $Config::Config{"osname"}))) ; $OS = $detailedOS; if ($OS=~/darwin/i) { # MacOS X, suggested by Todd Jonker on Codev $OS = "UNIX"; } elsif ($OS=~/Win/i) { $OS = "WINDOWS"; } elsif ($OS=~/vms/i) { $OS = "VMS"; } elsif ($OS=~/bsdos/i) { $OS = "UNIX"; } elsif ($OS=~/dos/i) { $OS = "DOS"; } elsif ($OS=~/^MacOS$/i) {# MacOS 9 or earlier $OS = "MACINTOSH"; } elsif ($OS=~/os2/i) { $OS = "OS2"; } else { $OS = "UNIX"; } ; # Initialise RCS file, ignored if empty string, # needed on Windows for binary files. Added JET 22-Feb-01 $rcsArg = ($OS eq "WINDOWS") ? "-x,v" : "" ; # null device /dev/null for unix, NUL for windows $nullDev = { UNIX=>"/dev/null", OS2=>"", WINDOWS=>"NUL", DOS=>"NUL", MACINTOSH=>"", VMS=>"" }->{$OS} ; # $htpasswdEncoding = ($OS eq "WINDOWS") ? "sha1" : "crypt" ; # This should enable gathering of extra error information on most OSes. However, wont work on NT4 unless unix like shell is used $endRcsCmd = ($OS eq "UNIX") ? " 2>&1" : "" ; # Command quote ' for unix, \" for Windows $cmdQuote = ($OS eq "UNIX") ? "\"" : "'" ; # Settings for Rcs (standard RCS programs) and RcsLite (built-in) @storeSettings = ( # RcsLite and Rcs dataDir => $dataDir, pubDir => $pubDir, attachAsciiPath => "\.(txt|html|xml|pl)\$", dirPermission => 0775, useRcsDir => $useRcsDir, # Rcs only initBinaryCmd => "$rcsDir/rcs $rcsArg -q -i -t-none -kb %FILENAME% $endRcsCmd", tmpBinaryCmd => "$rcsDir/rcs $rcsArg -q -kb %FILENAME% $endRcsCmd", ciCmd => "$rcsDir/ci $rcsArg -q -l -m$cmdQuote%COMMENT%$cmdQuote -t-none -w$cmdQuote%USERNAME%$cmdQuote %FILENAME% $endRcsCmd", coCmd => "$rcsDir/co $rcsArg -q -p%REVISION% $keywordMode %FILENAME% $endRcsCmd", histCmd => "$rcsDir/rlog $rcsArg -h %FILENAME% $endRcsCmd", infoCmd => "$rcsDir/rlog $rcsArg -r%REVISION% %FILENAME% $endRcsCmd", diffCmd => "$rcsDir/rcsdiff $rcsArg -q -w -B -r%REVISION1% -r%REVISION2% $keywordMode --unified=%CONTEXT% %FILENAME% $endRcsCmd", breakLockCmd => "$rcsDir/rcs $rcsArg -q -l -M %FILENAME% $endRcsCmd", ciDateCmd => "$rcsDir/ci -l $rcsArg -q -mnone -t-none -d$cmdQuote%DATE%$cmdQuote -w$cmdQuote%USERNAME%$cmdQuote %FILENAME% $endRcsCmd", delRevCmd => "$rcsDir/rcs $rcsArg -q -o%REVISION% %FILENAME% $endRcsCmd", unlockCmd => "$rcsDir/rcs $rcsArg -q -u %FILENAME% $endRcsCmd", lockCmd => "$rcsDir/rcs $rcsArg -q -l %FILENAME% $endRcsCmd", tagCmd => "$rcsDir/rcs $rcsArg -N%TAG%:%REVISION% %FILENAME% $endRcsCmd", ) ; 1;