Configuring phpCMS
From phpCMS
This article needs additional content.
Please remove this message from the page after completing the article and make also sure that the page has been removed from the listing on the needs content-page.
Notice: new config vars coming with version 1.2.2 need to be added
Contents |
[edit] phpCMS configuration settings
[edit] Introduction
In phpCMS the configuration is a class, located in the directory /parser/include and named default.php.
Most of the users will edit this file over the GUI of phpCMS. One could, however, do it using a text editor.
Be aware of the rules for editing PHP scripts:
- line endings have to be LF (not CR/LF!)
- nothing before the opening '<?php', no space, no empty line,
- nothing after the closing '?>', no space, no empty line.
This article documents all configuration variables.
Not all variables are editable over the GUI!
Please refer to the sections below for availability and the name used in the GUI.
Normally the default value should work, but that cannot be guaranteed.
According to the PHP syntax, all variables in the default.php file must have '$this->' in front of their name as they are class attributes.
[edit] System
| Setting | GUI | Default | Description |
|---|---|---|---|
| DOMAIN_NAME | not available | $PHP->GetDomainName() | Domain name of the project (site) including the protocol; if not or not correctly obtained automatically with the default value (something like 'http://www.example.net' or 'https://www.example.org') |
| VERSION | not available | $PHPCMS->VERSION.$PHPCMS->RELEASE | Version information of phpCMS - Do not change this value! |
| PROJECT | not available | 'PROJECT' | Currently unused setting that might be used in future. Leave the setting on default value |
| TAGFILE | not available | '' | Default path to the tag file (value will be overridden by the value given in the project file) |
| TEMPLATE | not available | '' | Default path to the template file (value will be overridden by the value given in the project file) |
| MENU | not available | '' | Default path to the menu file (value will be overridden by the value given in the project file) |
| MENUTEMPLATE | not available | '' | Default path to the menu template file (value will be overridden by the value given in the project file) |
| COMMENT | not available | ';' | Character used to mark comments in project files (.ini) and menu files (.mmu) |
| DYN_EXTENSION | not available | '.dyn' | File name suffix of dynamic cache files |
| PROJECTFILENAME | not available | '' | Default path and filename of the project file (value will be overridden by the value given in the content file) |
| DOCUMENT_ROOT | not available | $PHP->GetDocRoot() | Path to the 'document root' on the server - if not or not correctly obtained automatically with the default value above, use the absolute path to the 'document root' on the server (something like '/web/www.example.net/htdocs/') |
| SCRIPT_PATH | not available | $PHP->GetScriptPath() | Path to the script that starts phpCMS; -- if not or not correctly obtained automatically with the default value above, use the path to the phpCMS parser on the server, relative to DOCUMENT_ROOT (something like '/parser') |
| SCRIPT_NAME | not available | $PHP->GetScriptName(); | Name of the Script that starts phpCMS - if not or not correctly obtained automatically with the default value above: the name of the phpCMS parser script (something like 'parser.php') |
| FIX_PHP_OB_BUG | not available | 'off' | In some older PHP versions there is a bug within the OB handler. If this switch is set to 'on' phpCMS will use an internal workaround to avoid this bug. Usually, you better leave this setting off. |
| ERROR_ALL | not available | 'off' | Set all error reporting 'on' or 'off'; the 'on' setting is needed to help debugging. |
[edit] Files & Directories
| Setting | GUI | Default | Description |
|---|---|---|---|
| PAGE_EXTENSION | Page Extension to be parsed | '.htm'/td> | File name extension of content files (Note that this does not influence the files handed to phpCMS in stealth mode, just the file extension phpCMS is willing to parse). |
| PAGE_DEFAULTNAME | Name of default page | 'index' | File name (without extension) called when opening a directory without giving a file name (e.g. http://www.example.com/dir/) |
| TEMPEXT | Extension for Templates | '.tpl' | File name extension of template files |
| GLOBAL_PROJECT_FILE | Global Project file | '/template/home.ini' | Path and filename of the global project file, relative to DOCUMENT_ROOT |
| GLOBAL_PROJECT_HOME | Global Home-Directory for all Projects | '/' | Location of all projects home directory, relative to DOCUMENT_ROOT |
| PLUGINDIR | Plug-In Directory | '/parser/plugs' | Location (directory) of the plug-ins, relative to DOCUMENT_ROOT |
[edit] Parser
| Setting | GUI | Default | Description |
|---|---|---|---|
| START_FIELD | Field-Delimiter start tag | '{' | Opening character for a phpCMS field |
| STOP_FIELD | Field-Delimiter end tag | '}' | Closing character for a phpCMS field |
| MENU_DELIMITER | Menu delimiter | ';' | Character used to separate fields in menu files (.mnu) |
| TAG_DELIMITER | Tag parameter delimiter | ',' | Character used to separate parameters in tag files (.tag) |
| PAX | Use PAXPHP in your Files | 'off' | PAX is needed if one wants to include PHP scripts in content files. |
| PAXTAGS | Parse PAX TAGS | 'off' | PAX TAGS are tags (replaced at runtime) that invoke builtin functiion. If you want to use those tags, you need to activate both PAX and PAXTAGS. |
| MAIL2CRYPT | Mail2Crypt (Anti SPAM) | 'off' | Set encryption of email adresses in rendered pages to 'on' or 'off'. Read documentation on how to use this. |
| MAIL2CRYPT_JS | (only visible if 'Mail2Crypt (Anti SPAM)' is 'on') Mail2Crypt JavaScript Directory | '/' | Location (directory) of necessary js_mail2crypt.js script, relative to DOCUMENT_ROOT |
| MAIL2CRYPT_IMG | (only visible if 'Mail2Crypt (Anti SPAM)' is 'on') Mail2Crypt Icon Directory | '/parser/gif/' | Location (directory) of necessary icons replacing the letter '@' in displayed email addresses ('at.gif' and 'at_white.gif'), relative to DOCUMENT_ROOT |
[edit] Cache & Proxy
| Setting | GUI | Default | Description |
|---|---|---|---|
| CACHE_STATE | Server Cache | 'off' | Server-side caching of rendered pages (to speed up delivery) 'on' or 'off' |
| CACHE_DIR | (only visible if 'Server Cache' is 'on') Server Cache Directory | '/parser/cache' | Location (directory) where server-side cached pages will be stored, relative to DOCUMENT_ROOT (webserver-user needs write access) |
| CACHE_CLIENT | Client Cache | 'off' | Client-side caching of pages 'on' or 'off' |
| PROXY_CACHE_TIME | (only visible if 'Client Cache' is 'on') Live time of Proxy/Client Cache in days | 60*60*24*7 (GUI: 7) | Duration for which client-side cached pages are considered as valid. Attention: The value in the default.php is stored in seconds as '60*60*24*number_of_days', while in the GUI only the number of days needs to be entered. |
[edit] Transport
| Setting | GUI | Default | Description |
|---|---|---|---|
| GZIP | GZIP Compression | 'off' | Delivery of rendered pages takes place in G-ZIP compressed ('on') or uncompressed ('off') mode. Compressed mode speeds up transfer to the client and reduces the traffic volume, but needs processing time for compression on server side and decompression on client side. |
| STEALTH | File-Stealth-Mode | 'off' | With STEALTH / File-Stealth-Mode 'on', pages are accessed through 'normal looking' URLs instead of URLs like 'http://www.domain.tld/parser/parser.php?file=page.htm', i.e. without the 'parser.php?file=' showing in the browser's address bar. This makes sure that pages can be found and are indexed by search engines. Use of this feature is recommended. |
| STEALTH_SECURE | Secure Stealth Mode | 'off' | With STEALTH / File-Stealth-Mode 'on' and STEALTH_SECURE / Secure Stealth Mode 'on' requests via 'parser.php?file=filename.htm', e.g. 'http://www.domain.tld/parser/parser.php?file=page.htm' are blocked to prevent unauthorized access to files located in directories secured by means of a .htaccess file. Use of this feature is recommended. |
| NOLINKCHANGE | not available | '.gif;.jpg;.png; .css;.js;.php; .txt;.zip;.pdf' | List of file types not to be sent to the Parser. This specifies file types (classified by their file name extension) which, in non-Stealth mode, should not be changed to 'parser.php?file='. |
| DEBUG | Debug Mode | 'off' | Switch for the debug mode - (This should not left be 'on' during normal operation!) / When debug mode is activated phpCMS' internal error messages will be displayed if a file cannot be found or some other error occurs. |
| ERROR_PAGE | (only visible if 'Debug Mode' is 'off') Custom error page | '/error.htm' | Name and path of a user definded page (content file) displayed in the browser when an error other than '404' occurs. |
| ERROR_PAGE_404 | (only visible if 'Debug Mode' is 'off') Custom 404-error page | '/404.htm' | Name and path of a user defined page (content file) displayed in the browser when an '404 error' occurs ('Page/file not found'). 404 errors require special treatment with phpCMS since, from the server’s perspective, the file 'parser.php' is the only one that is ever requested, the server cannot detect a missing content page and, consequently, cannot generate a 404 error message. |
| TAGS_ERROR | Error on empty TAG | 'on' | Display of an error message if a tag referred in a content file is not found in the tag file 'on' or 'off'. When deactivated, such an undefined tag will be substituted with an empty string, i.e. it will not produce any output in the parsed page. To analyze such a fault, use the debug mode and have the tags and their substitution displayed. |
[edit] P3P Statement
| Setting | GUI | Default | Description |
|---|---|---|---|
| P3P_HEADER | Send P3P Header | 'off' | switch to send P3P information yes ('on') or no ('off') P3P: "The Platform for Privacy Preferences (P3P) is a specification and vocabulary that enables Web sites to communicate their data management practices to Web site visitors in a machine-readable format." (see e.g. [P3P Toolbox] for more information) |
| P3P_POLICY | (only visible if 'Send P3P Header' is 'on') Global P3P Policy Header | '' | (default) content of the P3P header Attention: the syntax for this header is regulated (no free text)! |
| P3P_HREF | (only visible if 'Send P3P Header' is 'on') P3P Policy href | '/w3c/p3p.xml' | Path and name of the P3P policy reference file |
[edit] Statistics
| Setting | GUI | Default | Description |
|---|---|---|---|
| STATS | Statistics | 'off' | Enable ('on') or disable ('off') statistics (logging of page hits with date, time, IP, browser, file name) |
| STATS_DIR | (only visible if 'Statistics' is 'on') Statistics - Directory | '/parser/stat' | Location (directory) of the statistics files, relative to DOCUMENT_ROOT (needs write permissions) |
| STATS_CURRENT | (only visible if 'Statistics' is 'on') Statistics - Directory | '/parser/stat/current' | Location (directory) of the current statistics file, relative to DOCUMENT_ROOT (needs write permissions) |
| STATS_FILE | (only visible if 'Statistics' is 'on') Statistics - Log File | 'stat.txt' | Name of the current statistics file (needs write permissions) |
| STATS_BACKUP | (only visible if 'Statistics' is 'on') Statistics - Backup-Directory | '/parser/stat/backup' | Location (directory) of the backed-up past statistics files, relative to DOCUMENT_ROOT (needs write permissions) |
| STATS_REFERER_COUNT | not available | '100' | How many referer Pages will be stored in the Statistics Logfile |
| STATS_REFERER_IGNORE | not available | '10.10.10.10;0' | Which IPs should not counted in the Statistics, normally internal Network Adresses and own Adresses if you have a fixed IP. |
| STATS_IP_COUNT | not available | '200' | How many caller IPs should be stored in the Statistics logfile |
| STATS_IP_IGNORE | not available | '1.10.10.10;0' | Which IPs should not be coulted in the Statistics - values delimited by ';' |
| STATS_URL_COUNT | not available | 200 | How many URLs (of requested pages) should be stored in the Statistics logfile |
| REFERRER | Referrer Logging | 'off' | Enable ('on') or disable ('off') referrer logging (logging of pages on which the user used a link to come to this site with date, time, IP, originating page, ...) |
| REFERRER_DIR | (only visible if 'Referrer Logging' is 'on') Referrer - Directory | '/parser/stat' | Location (directory) of the referrer log file, relative to DOCUMENT_ROOT (needs write permissions) |
| REFERRER_FILE | (only visible if 'Referrer Logging' is 'on') Referrer - Log File | 'referrer.txt' | Name of the referrer log file, relative to DOCUMENT_ROOT (needs write permissions) |
| REF_RELOAD_LOCK | (only visible if 'Referrer Logging' is 'on') Referrer - Reload Lock (for last IP in Seconds) | 60 | Time in seconds for which a hit from the last recorded IP will not be considered as a new hit (to avoid 'spamming') |
[edit] FileManager
| Setting | GUI | Default | Description |
|---|---|---|---|
| FILEMANAGER_STARTDIR | Startup directory of FileManager | '/' | Uppermost directory shown in the file manager (which is also part of the GUI), relative to DOCUMENT_ROOT |
| FILEMANAGER_DIRSIZE | Show dirsize in FileManager | 'off' | Switch to show the size of the files in every directory in the file manager (slows down performance of file manager) yes ('on') or not ('off') |
| FILEMANAGER_AREA_SIZE | Size of Editing Area in FileManager (Width, Height in Characters) | '85,21' | Dimensions of the text editing area in the included simple text editor. |
| FILEMANAGER_SHORTNAME_LENGTH | Shorten display of long file names (Number of Characters to display) | '22' | Number of characters displayed in file manager for long file names |
| CACHEVIEW_SHORTNAME_LENGTH | Shorten display of long URL aliases in CacheView (Number of Characters to display) | 45 | Number of characters displayed in file manager's cache view for long URLs |
[edit] Admin-GUI
| Setting | GUI | Default | Description |
|---|---|---|---|
| LANGUAGE | Select GUI language | 'en' (GUI: 'English', selectable) | Display language for the GUI, 'en' (GUI: 'English') or 'de' (GUI: 'Deutsch') |
| PASS | Password | 'pass' | Password for GUI and debugger access normally displayed as '******' in the GUI, can be shown in clear in a message box when pressing 'Show me...' (English) or 'Zeig's mir...' (Deutsch) on the right |
| PASS_MIN_LENGTH | not available | 6 | Minimum length in characters of above password |
| ENABLE_ONLINE_EDITOR | Online-Editor | 'off' | Switch to permit ('on') or disable ('off') the use of an online editor for content files |
| UPDATE | Check for Updates (Turn off, if you are behind a fire wall...) | 'off' | Switch to enable ('on') or disable ('off') the GUI to check for updates of the phpCMS software |
Important:
Do not forget to save your settings after you made changes via the GUI!
Main Page: User Documentation MainPage
« Previous Page: How to work with phpCMS | Top Page: How to work with phpCMS | Next Page: How to work with project files »

