Description
Here, in this file, all basic settings of the APPNET OS system are defined.
The settings are divided into general settings such as database settings and directory settings, settings for the application area and settings for the administration area.
Some settings in the application area can be made in the administrative area. at runtime.
Adjusted settings of the application area overwrite the settings of this file.
An object is generated from the core class config, which loads and processes all settings of this file.
There are two config classes so that the settings cannot be read from the administration area via the application area.
This enormously increases the security when using apps from other manufacturers.
The PHP file contains different types of variables, which are explained in detail in this documentation.
General settings
$this->dbType (string)
This is the future setting of the database type.
The APPNET OS database object has been prepared for other database types, but has not yet been tested and configured.
Please use mysql for the safe use of APPNET OS and make sure that mysql is also in this setting.
$this->dbHost (string)
Enter the host or the IP of the database here.
$this->dbName (string)
The name of the database is to be defined here.
$this->dbUser (string)
Please enter the user name with which you access your database here.
$this->dbPass (string)
The password of your database user must be stored here.
$this->dBPort (string)
The database port is configured here.
The standard mysql port is 3306.
$this->dbCharset (string)
Since APPNET OS is multilingual and supports all languages, utf8 is used by default.
If you do not use several languages, you can change the formatting here to reduce storage space in your database.
In general, however, we advise you not to do so, as this makes it more difficult to expand the system with new languages.
$this->prefix (string)
APPNET OS uses a prefix with, as a rule, 3 letters for each database table.
This means that several APPNET OS instances can be used with just one database.
The prefix can be freely chosen for the installation of APPNET OS.
Note that if you change this prefix at runtime, all database tables must be adapted.
$this->url (string)
Define the host and the URL up to the index.php file under which your APPNET OS instance can be called.
index.php must not be included here.
APPNET OS does not have to be directly accessible via the host, but can also be located in a subdirectory.
Example that can be called up directly via the host:
https://my-page
Example can be called via subdirectory:
https://my-page/my-appnetos
$this->dir (string)
The server directory under which the index.php of your APPNET OS instance is located must be here.
index.php and / at the end may not be entered.
$this->cacheDir (string)
APPNET OS offers a whole range of cache functions which generate and retrieve files at runtime.
There are two ways to configure the cache directory.
A directory in the document directory of your APPNET OS instance or a directory outside, somewhere on your server.
You can easily configure this with a / at the beginning of the entered string.
An absolute server path is used with a / at the beginning of the string.
If there is no / at the beginning, the directory is created in the document directory.
We generally recommend storing all directories outside of the document directory.
$this->tmpDir (string)
The temporary directory is used by the template engines and file uploads used by the APPNET OS.
The directory must be configured in the same way as the cache directory.
$this->logDir (string)
The APPNET OS log files are stored here.
This directory can be configured like the cache directory.
$this->compileDir (string)
The template engines used generate compile files at runtime, for which an additional directory is required.
The directory can be configured like the cache directory.
$this->configDir (string)
Another directory is required by the template engines in order to generate configuration files at runtime.
The configuration is the same as that of the cache directory.
$this->debug (bool)
This flag can be used to activate the APPNET OS debugger.
If the APPNET OS Debugge is active, APPNET OS is stopped for all serious errors and an error message is output.
Errors that are not system-relevant are appended to the end of the output.
In addition, useful information on JavaScript queries that run via the APPNET OS script can be called up via the console.
$this->debugAjax (bool)
APPNET OS generates an AJAX UUID for each SESSION, which must be sent with all AJAX queries.
This flag is used to append the UUID Visible to the end of the output.
Settings of the application area
$this->appCache (bool)
This enables the app cache to be activated or deactivated.
The APPNET OS app cache enables the output of the apps to be written completely to a file that is loaded the next time it is called.
As a result, no more classes are loaded or executed on further calls.
This speeds up the system enormously and can reduce the loading time by up to 40%.
How and whether an app uses the app cache depends on the respective development.
$this->cacheExpire (int)
Time in seconds in which an app remains in the app cache until it is automatically regenerated.
This value can vary depending on the system and use of the apps.
We recommend keeping the apps in the cache for as long as possible.
$this->fileCache (bool)
The file cache helps PHP find the files.
Due to the file cache, the SPL Autoloader does not have to search for the PHP files in all directories, which saves a lot of time.
The file cache should always be active in live operation and should only be deactivated for development.
$this->directoryCache (bool)
The directory cache behaves similarly to the file cache and supports PHP in finding app directories.
This cache should also always be active, except for development, as it also saves time and performance with each call.
$this->stringCache (bool)
If the string cache is active, all language files are collected at runtime.
If an app is called up again, the file no longer needs to be loaded by PHP.
This cache should also always be active in live operation, as it saves a little time with each call.
$this->jsCache (bool)
The JavaScript cache is one of the most ingenious features in APPNET OS.
This function is actually not a cache, but a JavaScript compiler and minimizer.
APPNET OS is an app-based system for web applications.
Each app has its own JavaScript, which is attached at the end of the output without a JavaScript cache.
The JavaScript cache collects all these files the first time it is called, minimizes them, saves them in a file and integrates them in the head area.
This means that app JavaScript files no longer have to be loaded and the minimized file is cached by the browser.
Developers have to make sure that their scripts are written absolutely correctly, otherwise this can affect the entire JavaScript cache.
In certain cases, apps can be excluded from the JavaScript cache via the app settings.
$this->cssCache (bool)
The CSS cache behaves like the JavaScript cache.
When you open it for the first time, all app CSS files are collected, minimized and saved in a CSS file.
The file is then integrated in the head area so that it is cached by the browser.
This means that additional minimizers and compilers are not required.
Certain apps can be excluded from the app cache via the app settings.
$this->minify (bool)
The APPNET OS JavaScript Cache and CSS Cache automatically minimize the files.
If the caches are inactive, the contents of the CSS files are appended to the top of the source text and the contents of the JavaScript files to the bottom.
This option can be used to define whether the attached content is minimized when the caches are deactivated.
$this->compressor (bool)
The compressor transfers the complete source code to the client in compressed form.
The compressor saves up to 20% of the size of the transmitted source text.
$this->clearAllCachesParameter (string)
This option is intended for debugging and development.
If this value is appended to the URL as a GET parameter with the value 1, all caches are emptied and rebuilt during runtime.
The example below shows how you can clear the cache.
Example with the value anocc:
https://my-appnetos.com?anocc=1
$this->includeJs (array)
Sources of JavaScript files can easily be added to this array, which are then integrated in the head area so that they are loaded crosswise.
$this->includeCss (array)
CSS files can be cross-loaded by adding them to this array in the same way as JavaScript files.
$this->directories (array)
APPNET OS automatically loads all classes from the predefined app directories for classes.
If a class is outside of the predefined app directories, the directories can be added here.
The directories are automatically added to the SPL autoloader so that the classes are loaded.
$this->userImageDir (string)
APPNET OS provides a function that users can upload user images.
In the event that these should not be saved in the standard directory for user images, this can be changed here.
Please note that the directory must be in the document directory, otherwise the images cannot be loaded by the client.
$this->applicationUserData (array)
These ingenious functions allow the user information to be expanded infinitely.
The extra user data is saved in JSON format directly in the user table and can be viewed and changed in the administrative area.
This means that apps do not have to create an extra database table or change existing database tables.
Values can easily be added to this array with a key.
String, integer and bool are permitted.
Example:
"my-user-data-string" => "String",
"my-user-data-int" => 12345,
"my-user-data-bool" => true
$this->signInErrorCount (int)
Defines the number of incorrect logins, with a user name or an e-mail address, before the user account is blocked.
$this->resetPasswordExpire (int)
APPNET OS provides functions and apps with which the password of a user account can be reset.
This value can be used to define how long, in seconds, the link to reset a password is valid.
$this->cookieLock (bool)
APPNET OS has an integrated cookie blocker system that categorizes cookies into required system cookies, functional cookies, statistics cookies and marketing cookies.
Cookies can then only be set if the user agrees to them by using an app.
Please note that app developers do not have to adhere to these rules.
This function can therefore be completely deactivated here, which means that all cookies are always set.
$this->userRegex (array)
For apps, functions for creating and managing user accounts are provided in APPNET OS.
This array can be used to easily determine which length and which characters a user name may contain using several regex patterns.
When checking a user name, the patterns in this array are all applied one after the other.
This allows you to influence the design of the user names without interfering with the code of the core.
$this->passRegex (array)
As for the user name, patterns can be defined to influence the design of passwords.
$this->disableGroups (bool)
APPNET OS has an integrated group management with which user groups can be created.
Access to apps or complete URIs can be restricted via user groups.
If you have no restrictions in your web application, you can use this to completely deactivate the user groups for the application area.
$this->authenticationLifetime (int)
The APPNET OS Authenticator enables users to save their login as a cookie.
When this feature is used, users do not always have to log in again.
This numerical value can be used to define how long, in seconds, a user login is saved until the user name and password have to be re-entered.
$this->sessionTimeout (int)
Time in seconds until a PHP session expires.
APPNET OS uses its own PHP session system.
This can be used to define how long, in seconds, the session will be kept.
The standard here is 10 minutes.
If you provide apps for your users that have long execution times, such as special downloads or the output of videos, then the time should be increased accordingly.
Settings of the administration area
$this->adminAppCache (bool)
This enables the app cache to be activated or deactivated for the administrative area.
The APPNET OS app cache enables the output of the apps to be completely written to a file that is loaded the next time it is called.
As a result, no more classes are loaded or executed on further calls.
This speeds up the system enormously and can reduce the loading time by up to 40%.
All APPNET OS apps that were provided for the administrative area are preconfigured for the app cache.
Changing this setting is only necessary for test purposes or for troubleshooting.
$this->adminCacheExpire (bool)
Time in seconds until the app cache in the administrative area expires and is rebuilt.
Changing these parameters is only necessary for test purposes or for troubleshooting.
$this->adminFileCache (bool)
The APPNET OS file cache is also active for the administrative area and supports PHP in finding files by collecting all available PHP files in a JSON file and forwarding them directly to the SPL autoloader.
Files are usually written to the cache file once and are retained forever.
Files from the app admin area are therefore generally excluded here.
The cache can be temporarily deactivated for developers who want to adapt the administrative area.
$this->adminDirectoryCache (bool)
The directory cache for the administrative area also supports PHP in finding directories that contain app files.
Directories are also collected here in a JSON file and passed on directly to PHP so that they no longer have to be searched for separately with each call.
The cache is usually kept forever and should only be deactivated for developers who want to influence the administrative area.
$this->adminStringCache (bool)
The string cache is always active for the administrative area.
The contents of the language files are collected at runtime and cached in a file.
This means that they no longer have to be loaded and processed for further calls.
If you adjust the language files for the administrative area, this can deactivate the string cache.
$this->adminJsCache (bool)
The administrative area in APPNET OS is also an app-based system.
Each admin app has its own JavaScript, which is attached at the end of the output without a JavaScript cache.
The JavaScript cache collects all these files the first time it is called, minimizes them, saves them in a file and integrates them in the head area.
This means that app JavaScript files no longer have to be loaded and the minimized file is cached by the browser.
If JavaScript files are changed by admin apps, the JavaScript cache for the administrative area can be deactivated with this option.
$this->adminCssCache (bool)
The CSS cache behaves like the JavaScript cache.
When you open it for the first time, all app CSS files are collected, minimized and saved in a CSS file.
The file is then integrated in the head area so that it is cached by the browser.
This means that additional minimizers and compilers are not required.
The cache is active by default and can be deactivated when adjusting CSS files in the administrative area.
$this->adminMinify (bool)
The APPNET OS JavaScript Cache and CSS Cache automatically minimize the files.
If the caches are deactivated for the administrative area, the contents of the CSS files are appended to the top of the source text and the contents of the JavaScript files to the bottom.
This option can be used to define whether the attached content is minimized when the caches are deactivated.
$this->adminCompressor (bool)
This option compresses the source code of the administrative area.
This saves approx. 20% of the size when transferring to the client.
The compressor is active by default and should only be deactivated for test purposes or troubleshooting.
$this->adminClearAllCachesParameter (string)
This option is intended for debugging and development.
If this value is appended to the URL as a GET parameter with the value 1, all caches of the administrative area are emptied and rebuilt during runtime.
The example below shows how to clear the cache.
Example with the value anocc:
https://my-appnetos.com/admin?anocc=1
$this->adminUserImageDir (string)
In APPNET OS, images can also be uploaded for the administrators in the administrative area.
In the event that these should not be saved in the standard directory for user images, this can be changed here.
Please note that the directory must be in the document directory, otherwise the images cannot be loaded by the client.
$this->adminUserRegex (array)
This array can be used to easily determine which length and which characters a user name for the administrative area may contain using several regex patterns.
When checking a user name, the patterns in this array are all applied one after the other.
This allows you to influence the design of the user names without interfering with the code of the core.
Please note that the username in the administrative area has no influence on security, as the email address is used to log in.
$this->adminPassRegex (array)
As for the user name, patterns can be set to influence the design of passwords in the administrative area.
The standard requires a length of at least 8 characters, at least 1 capital letter, 1 lowercase letter and one special character.
The security standard should be retained for the administrative area, as this will manage your entire web application.
$this->adminDisableGroups (bool)
APPNET OS has an integrated group management with which user groups can be created in the administrative area.
Access to apps or complete URIs can be restricted via user groups.
If you have no restrictions in your administrative area, you can use this to completely deactivate the user group.
$this->adminSessionTimeout (int)
Time in seconds until a PHP session expires.
In APNET OS, the PHP sessions are managed completely separately from the application area and the administrative area.
This can be used to define how long, in seconds, the session will be kept for your administrative area.
The standard here is 10 minutes.
If you use apps that require time-consuming administrative work, such as writing texts in several languages, then you can adjust and increase the time as you wish.
$this->adminFilesDirectories (array)
The file manager in the administrative area is best suited to manage files in certain directories.
For security reasons, you cannot directly access all directories within your document directory.
The directories that can be managed via the file manager must be added here in this array.
Please note that files and directories deleted via the file manager can no longer be restored.
$this->adminFilesDirectories (array)
Der Datei-Manager im Administrativen Bereich eignet sich am besten um Dateien in bestimmtem Verzeichnissen zu verwalten.
Aus Sicherheitsgründen können Sie nicht direkt auf alle Verzeichnisse innerhalb Ihres Dokumenten-Verzeichnisses zugreifen.
Die Verzeichnisse, die über den Datei-Manager verwaltet werden können, müssen hier in diesem Array hinzugefügt werden.
Bitte beachten Sie das Dateien und Verzeichnisse die über den Datei-Manager gelöscht werden, nicht mehr wiederhergestellt werden können.
$this->adminFilesTypes (array)
This array can be used to define which file types can be displayed and processed via the file manager.
If you do not get files displayed via the file manager, then add the file extension here in this array.
$this->adminExpertMode (bool)
A few settings are hidden in the administrative area.
These can be made visible in the expert mode.
With this flag you can activate the expert mode so that all settings are visible in the administrative area.