Per Stenebo
2011-10-01 16:29:41
2019-03-16 18:04:13

System configuration

Variables for system configuration, located in ~/sysConfig/BendCMS_config.php

That file contain the latest and most accurate description of each variable. The following info are usually outdated.

User sessions and cookies

Session and cookie name, used primarily for user login variables.
The intent is to facilitate integration with other services

$sConf['sessName'] = 'bendSess';

Cookie name.
Set to false to disable cookie and the "Remember Me"-function
String like 'bendCoo' or false. It should be a different string than $sConf['sessName'].

$sConf['cooName'] = 'bendCoo';

User language cookie name. Set to empty string to disable language selection. 
String like 'bcmsLang' or empty.

$sConf['cooLang'] = 'bcmsLang';

Default expiry time in seconds for user login cookie.
This will only be checked when the default PHP session has ended and the system tries to restore it via the login cookie.
Integer or an expression that results in an integer.
3600 * 999 = 999 hours ~= 41 days (999 hours is max)

$sConf['session-expiry'] = 3600 * 999;

Set maximum number of concurrent cookie-supported sessions for the same user account.
Integer. Default value: 10, minumum value: 1

$sConf['maxSessions'] = 10;

Set level of feedback on messages.
10=everything, 9=core development, 8=plugin development, 7=page development, 5=production

$GLOBALS['BendCMS']['verbose'] = 10;

Site configuration
Site name, usually the organization name. String.
This may be included in header page title, depending on template.

$sConf['sitename'] = 'mySite';

Site URI
This should be the complete web path to the root of this installation
Example: 'http://www.domain.com/bendcms'
This should be analogue to using $_SERVER['SCRIPT_URI'], but it don't work on all servers
This will be used as fallback if it can't be set dynamic.

$sConf['siteURI'] = '';

Set public contact email to display openly, like in footer.

$sConf['system_email_public'] = 'info@example.com';

Set working email to send system emails to

$sConf['system_email_to'] = 'webmaster@example.com';

Set email to send system emails from (as sender)

$sConf['system_email_from'] = 'postmaster@example.com';

Set email for user to reply on system emails

$sConf['system_email_reply'] = 'noreply@example.com';

Activate system mailservices: true or false
Default: false

$sConf['mailservice'] = false;

Set default language code as of ISO 639-1 Language Codes
Examples: sv / en
There must be a corresponding file in ~/sysLang

$sConf['lang'] = 'sv';

Set id of start page. Integer. Default value: 100

$sConf['startPage'] = 100;

User permission levels

All level variables must be an integer between 0 and 255 if not stated otherwise.

Level for blacklisted guests
Blacklisted guests are not allowed to comment pages or write in guestbook

$sConf['blacklistLevel'] = 0;

Level for anynomus guests

$sConf['guestLevel'] = 1;

Level for registered but blocked users

$sConf['blockLevel'] = 2;

user level for deleted users

$sConf['deletedLevel'] = 3;

user level for newly registered, but not yet confirmed, users

$sConf['registeredLevel'] = 5;

user level for inactive users

$sConf['inactiveLevel'] = 7;

user level for (newly) registered and confirmed users

$sConf['confirmedLevel'] = 10;

Minimum user level to create and edit pages

$sConf['createLevel'] = 100;

User level allowed to encrypt content.
Set to false to disable content encryption.
Integer 0-255 or false

$sConf['encryptLevel'] = 110;

Minimum user level for site administrators

$sConf['adminLevel'] = 200;

Redirect to this address on permission error
Set to false to inactivate redirection
Default value: 'system/member/login'

$sConf['redirectOnPerm'] = 'system/member/login'; // String or false

Salt strings

Salt strings are used to enhance security by adding an unknown string to a known string.
I recommend using characters between decimal 33 and 126 in the ASCII table to avoid problems.

Password salt. String.

$sConf['pwdSalt'] = 'xyz123';

String to serve as suffix in folder names, hiding content from direct access.
It can be any string who is fit as part of a folder name on the host system.
Using a mixed combination of numbers, upper case and lower case letters should be safe on most systems. 

$sConf['pageSalt'] = 'xxx';

Limit number of backup files

Maximum number of page content backup files

$sConf['max_pageContent_backup'] = 5;

Maximum number of page config backup files

$sConf['max_pageConfig_backup'] = 5;

Maximum number of member config backup files

$sConf['max_member_config_backup'] = 5;

Member variable member number:
This can be used as member number, employee number or whatever
Set to true to enable the field Member number.
true / false Default: false

$sConf['useMemberNumber'] = false;

Array of allowed usergroups.
Default values for new users are set in config for user 0, memberConfig/0.php
Usergroups can be used where the hierarchical user levels don't work well
Do not alter the group name 'administrator', it is used in system files.
Do not alter the group name 'moderator', it is used to allow moderation of page comments.

$sConf['usergroups'] = array('moderator', 'administrator');


Path to default log folder

$GLOBALS['BendCMS']['logDir'] = $sConf['sysDir'].'/logfiles';

Path to default log file

$GLOBALS['BendCMS']['logfile'] = $GLOBALS['BendCMS']['logfolder'] . '/global_log.skv';

Verbosity for logfiles. Integer 0-10. Default: 10. Higher value give more info. 5 is a good production level. Integer.

$GLOBALS['BendCMS']['loglevel'] = 10;

Path to global file for blacklisted users. false or string

$GLOBALS['BendCMS']['blacklist'] = $GLOBALS['BendCMS']['logfolder'] . '/blacklist.skv';

File and folder permission

Set permission in octal form for folders created in BendCMS.
Surftown: 0755 | r-xr-x (755) (User,Group,World)

$GLOBALS['BendCMS']['dirPerm'] = 0755;

Set permission in octal form for files created in BendCMS.
Surftown: 0644 | rw-r--r-- (644) (User,Group,World)

$GLOBALS['BendCMS']['filePerm'] = 0644;

Variables for PHP engine

Enable output to screen of errors generated by PHP engine.
Set to 0 in production environment to hide error messages from users.
This is important for security because error messages from php engine often contain the pageSalt.
0 or 1

$sConf['display_errors'] = 1;

Enable log to file for errors generated by PHP engine.
0 or 1

$sConf['log_errors'] = 1;

Set path to log file for errors generated by PHP engine.

$sConf['error_logfile'] = $GLOBALS['BendCMS']['logfolder'].'/php-error_log.txt';

Content editor configuration

The name of the editor to configure is in the second array key.


Should be a .css file in the folder ~/cssFiles

$sConf['editor']['code_editor']['css_file'] = 'code_editor.css';

Should be a .js file in the folder ~/jsFiles

$sConf['editor']['code_editor']['js_file'] = '';

Name to show in select box

$sConf['editor']['code_editor']['name'] = 'Kod; endast XHTML/PHP/Javaskript-kod.';


$sConf['editor']['CKEditor']['css_file'] = 'code_editor.css';
$sConf['editor']['CKEditor']['js_file'] = '';
$sConf['editor']['CKEditor']['name'] = 'CKEditor: grafiskt redigeringsverktyg.';

Content encryption configuration

Name to show in select box

$sConf['contEncrypt'][0]['name'] = 'Ingen kryptering';
$sConf['contEncrypt']['gibberish-aes']['name'] = 'Gibberish AES';
$sConf['contEncrypt']['gibberish-aes']['page_id'] = 38;

Page sharing

Allow all users with edit permission to a restricted page to share the page via a link.
The shared page will be accessible by anyone who have the link.
Set maximum access_level for pages that should be allowed to be shared.
Set to zero to disable page sharing.   

$sConf['sharePage_maxAccessLevel'] = 99;   

Set length of share page password
Minimum value is 20, this number is hardcoded for security.
If less than 20, an error message appear on access.
Maximum total URL length is not fixed but should be less than 2000 characters to avoid problems.

$sConf['sharePage_passLen'] = 40;

Define other variables

Set global arrays for messages

$GLOBALS['BendCMS']['error'] = array();
$GLOBALS['BendCMS']['info'] = array();

Available menues

$sConf['menues'] = array(0=>'none', 1=>'mainmenu');

$sConf['menuDescrArr'] = array(0=>'- Ingen meny', 1=>'Huvudmeny');

Arrays for file names to include

$bVar['logic_files'] = array();
$bVar['css_files'] = array();
$bVar['js_files'] = array();
$bVar['content_files']['header'] = array();
$bVar['content_files']['leftcol'] = array();
$bVar['content_files']['content'] = array();
$bVar['content_files']['rightcol'] = array();
$bVar['content_files']['footer'] = array();

$bVar['contentPath'] = false;
$bVar['contentChanged'] = false;


Start value for database connection:
It is used to check if the database connection is active.

$sConf['dbConn'] = false;

Kommentarer till sidan Systemkonfig