PHP_Framework

Wh1t3projects' PHP framework. Small PHP framework for building web apps and websites

View the Project on GitHub

Available settings in the configuration wizard

Below is the description for each available settings in the Framework configuration wizard.

System

Which folder is the root of the website?</br> Setting name: webroot
Default: webroot
This setting defines which folder, from the framework’s root, holds all the web pages. These pages can contain PHP code, but is not mandatory. This is called the webroot folder, because this is where the the default document resides and all files under that directory are publicly available.
This folder must exist and be readable.

Which folder hold the themes?
Setting name: themes
Default: themes
This setting defines which folder, from the framework’s root, holds the themes and their related files. This includes not only the footer and header, but also any CSS, images and fonts. This folder is not directly accessible and only the currently selected theme will have its files accessible via the “folder” defined by themes_fromWebroot

Which folder hold the modules?
Setting name: modules
Default: modules
This setting defines which folder, from the framework’s root, holds the modules that can be added to the installation.

Database

What is the SQL server host name or address?
Setting name: sql_host
Default: Null
The SQL host to connect to when a SQL connection is required. Not required if the application doesn’t require a connection to a SQL server.

What is the username?
Setting name: sql_user
Default: Null
The username to use when authenticating against the SQL server. Not required if the application doesn’t require a connection to a SQL server.

What is the password?
Setting name: sql_pass
Default: Null
The password to use when authenticating against the SQL server. Not required if the application doesn’t require a connection to a SQL server.

What is the name of the database?
Setting name: sql_db
Default: Null
The database to use when executing SQL queries. Not required if the application doesn’t require a connection to a SQL server.

Which driver to use?
Setting name: sql_drv
Default: Null
The setting define which SQL driver to use. This driver will be loaded during the framework’s startup and will cause a Kernel panic if the driver doesn’t exist. New drivers can be installed by copying relevant files to Kernel/SQL/. If the setting is Null or empty, all SQL related functions will not be defined and, therefore, be unavailable.
NOTE: The list shown in the wizard is generated based on the currently available drivers, without checking if they currently work. If a new driver is installed after the wizard has been started, the page must be reloaded (causing any changes to be lost) before they will bw shown. It is always possible to change the selected driver after saving the configuration.

What is the tables prefix?
Setting name: sql_prefix
Default: prefix_
The prefix to add to the tables’ name when executing queries.
NOTE: This exclude the sql_query() function, which allow “raw” queries to be sent to the SQL server.

Application

What is the base URL?
Setting name: app_location
Default: Determined during setup. Based on the current request URL
This setting defines what is the second part of the URL (after the hostname). This is considered visible root of the application.

Where the framework is installed?
Setting name: app_real_location
Default: Determined during setup. Based on the current real location of the Framework on the server
This setting defines where is the application installed on the server. Used to determine full paths when generating them.

What is the name of the theme?
Setting name: theme
Default: default
This setting defines which theme will be used when rendering pages. The theme must exist when saving.

What is the name of the default document to show?
Setting name: default_document
Default: index
This setting defines which document will be used for rendering when not specified in a request. The value must not contain the extension.

What is the extension of all the documents to execute in webroot?
Setting name: documents_extension
Default: html
This setting defines the extension to apply to all requested pages. This extension is appended to the files’ name and is used internally to find the correct page in the webroot folder.
NOTE: No matter what extension is used, all files with this extension will be processed as PHP scripts when they are requested.

What is the ISO 639-1 language code?
Setting name: lang
Default: en
This settings defines the application’s web interface language. The value must be in the format defined by ISO 639-1.
NOTE: Changing this setting will not have any effect on the behavior of the Framework. It is therefore only useful to the modules and any other part of the application that uses it.

What is your time zone (in PHP format)?
Setting name: timezone
Default: Determined during setup. Based on the current web server settings (if available)
This setting defines which timezone to use when calculating dates. Using the correct value is important since this is used by the logging system and all functions (including PHP functions) that requires the time.

What are the file”s extension that can be downloaded directly?
Setting name: allowed_file_ext
Default: jpg;gif;png;txt
This setting defines which type of files (based on their extension) are allowed to be downloaded directly from the webroot folder. They will not be processed as PHP scripts.

Theme

Check if the theme is compatible with the current version of the Framework?
Setting name: theme_checkVersion
Default: Yes
This setting defines if the Framework should check if the selected theme reports to be compatible with the current version.

What is the folder that hold the css files?
Setting name: themes_css
Default: css
This setting defines which folder, inside the theme’s folder, hold the CSS files. This setting is only used by the theme when generating the publicly available path.

What is the folder that hold the js files?
Setting name: themes_js
Default: js
This setting defines which folder, inside the theme’s folder, hold the JavaScript files. This setting is only used by the theme when generating the publicly available path.

What is the folder that hold the image files?
Setting name: themes_img
Default: img
This setting defines which folder, inside the theme’s folder, hold the images. This setting is only used by the theme when generating the publicly available path.

What is the public folder that refer to the theme?
Setting name: theme_fromWebroot
Default: theme
This setting defines which “folder” used for public path to the theme’s files. This is used by the theme when generating paths, but also by the framework to expose the theme’s files.

Debug

Enable debugging?
Setting name: debug
Default: False (No in the setup wizard)
This setting control whether or not debugging is enabled. If disabled, all warnings and errors (except when a Kernel panic occur) are hidden from the user. Also, the logs are not written to the log file.
NOTE: A value of FALSE is recommended for production setups only, since this may prevent proper debugging.
Also, this setting does not disable the logging system internally. Logs can still be recovered by modules at runtime and a Kernel panic will dump the current log to panic.log.

When debugging is enabled, which file is used for storing the log? (root is the framework’s root)
Setting name: debug_file
Default: /debug.log
This setting defines where the log file should be stored (along with it’s name). The root (/) is the application’s root. If a sub-folder is used, this folder must exist before saving.

Allow application to run even if a kernel panic occurred before?
Setting name: debug_panic
Default: True (Yes in the setup wizard)
This setting control whether or not subsequent executions should be allowed if a Kernel panic occurs. Disabling it can be useful if the stability of the code is fully trusted and that a Kernel panic means that no more requests should be processed until the issue has been investigated (like if an attacker tried to do something terribly wrong). This effectively put the Framework in some sort of “lockdown” mode.

When debugging is enabled, what do you want to show?
Setting name: debug_output_level
Default: 0
This setting control which type of debugging messages should be sent to the browser. Please see the debug_level setting for a list of acceptable values.

When debugging is enabled, what do you want to send to the log?
Setting name: debug_level
Default: 4
This setting control which type of debugging messages should be sent to the log file. Accepted values are: