The Configuration file config.php

Like many other programs Admidio also provides a central configuration file, in which the most important settings are stored. You'll find the file in the folder adm_my_files (up to and including 2.4 Admidio the file was directly saved in the Admidio main folder). It is automatically created during the installation and stored there. Usually it is no longer necessary to open and edit. In rare cases, but this may still be necessary, for example, while moving the Admidio folder or to activate a more detailed logs. For this reason we want to give you an overview of the existing and possible settings in the file, as well as a explanation of each setting.

$g_adm_srv

The name of the database server. This is specified by the hoster. For a local device it could be localhost or 127.0.0.1.

Possible values: default by Host
Required version: from 1.0

$g_adm_usr

Name of the user who can log onto the database . This is specified by the hoster.

Possible values: default by Host
Required version: from 1.0

$g_adm_pw

Password of the user who can log on to the database. This is specified by the hoster.

Possible values: default by Host
Required version: from 1.0

$g_adm_db

Name of the database in which the tables Admidio been created. This is specified by the hoster.

Possible values: default by Host
Required version: from 1.0

$g_adm_port

Optionally the port to the database can be specified here. If this parameter is not set, the default port of the database (MySQL: 3306, PostgreSQL: 5432) is used.

Possible values: Specification from the webhoster
Required version: from 3.2

$g_organization

The abbreviation of the default organization. Are managed through Admidio multiple organizations, each organization could have their own Web space and this variable controls which organization is managed through this Webspace. If several organizations over a Webspace controlled, so this variable indicates the organization, which is pre-selected at login.

Possible values: Value from table field adm_organizations::org shortname
Required version: from 1.0

$g_root_path

URL of the current Admidio installation. The URL must not end with a slash or backslash. If the Admidio folder moved, so these variables must be adapted accordingly.

Possible values: https://www.admidio.org/demo or the URL to your Admidio installation
Required version: from 1.0

$g_tbl_praefix

All tables of Admidio in the database get a unified prefix, which is defined here. If you want to set up another Admidio installation in the same database, so each Admidio installation must have its own prefix. About the indication stored here knows Admidio belong which tables to this installation with this configuration file.

Possible values: adm or any combination
Required version: from 1.0

$gCheckIpAddress

Any user, whether logged out or logged in, will have a unique session ID. This ID is passed on every page request. If a foreign person is now scanning the traffic between the computer and the server and gets access to this ID, he could assign with this session ID as current user. He therefore would has all the rights in the system that owns the original user. To prevent this abuse, Admidio compares additionally on every page request, the associated IP address to this session. If the IP address changes in between, so Admidio recognizes this as an invalid connection and closes the corresponding session.

This setting is always enabled and does not need to be explicitly set in config.php. Are there, however, some users having problems or some users are using deliberately Services that change the IP address on a regular basis, so the test can be disabled.

Possible values: 0 (disabled) or 1 (enabled)
Required version: from 3.1

$gDbType

Admidio supports in addition to MySQL also PostgreSQL databases. This variable specifies which database engine is to be used.

Possible values: mysql or postgresql
Required version: from 2.3

$gDebug

Flag via the extensive logging is enabled. This should only be used in test systems because the log file may grow rapidly. In a production environment this setting should only be enabled specifically for debugging. The following items are also logged:

  • All SQL-Statements
  • Number of records found in SELECT statements
  • Name and path of the called script
  • Parameter transfers referring to scripts
  • Debug output when sending mail via SMTP
  • Uncompressed Javascript and CSS files are linked

Possible values: 0 (disabled) or 1 (enabled)
Required version: from 2.0

$gImportDemoData

This parameter is only intended for test systems and allows a test data import. In a production environment, this can lead to a complete loss of data.

Possible values: 0 (disabled) or 1 (enabled)
Required version: from 3.0

$gLoginForUpdate

This flag ensures that a database update can only be carried out on a new Admidio version, if an administrator has given his credentials in the update script. This function is always active in the default and can be disabled in the config.php via this parameter. For security reasons, we recommend that this feature should always be enabled. In a test systems it is useful to disable the function.

Possible values: 0 (disabled) or 1 (enabled)
Required version: from 3.0

$gSetCookieForDomain

This flag ensures that the cookie is valid for the entire domain where Admidio is installed. If Admidio is installed in the folder http://www.meine-domain.org/admidio, for security reasons the default cookie is only available for scripts located in the folder www.my-domain.org/admidio or below. Scripts at www.meine-domain.org or www.my-domain.org/test can not read the cookie. If you want to use a script to log in to Admidio in another folder, you must activate this flag.

Possible values: 0 (disabled) or 1 (enabled)
Required version: from 3.2.11

$gPasswordHashAlgorithm

Optionally, the encryption algorithm for the user passwords can be stored here. This should always point to DEFAULT . Then the best algorithm, supported by all current PHP installations, is taken. SHA512 is not automatically available on all servers, so this option should only be selected if it is ensured that the Admidio version will always run on a server that supports this encryption.

Possible values: ​DEFAULT,​ ​BCRYPT,​ ​SHA512
​ Required version: from 3.2

$gForceHTTPS

Optionally, a forwarding of HTTP calls to HTTPS calls can be set by Admidio. The default setting is false.

Possible values: ​true,​ ​false
​ Required version: from 3.2

$gTimezone

Specifying the time zone that will be used for this organization. The value corresponds to one of PHP support Time Zone. The time zone is set once during installation and should not thereafter be changed. Must the time zone be nevertheless adjusted later, so the times already recorded are not adjusted to the new time zone.

Possible values: Europe/Berlin
Required version: from 3.1

  • en/2.0/konfigurationsdatei_config.php.txt
  • Last modified: 2017/12/04 21:04
  • by fasse