Bonfire includes the
Installer_lib library to simplify the installation process.
For additional information, see Installing Bonfire.
This documentation is primarily intended for those who wish to improve or extend the
The library is not intended for use within an application, and should be removed once the application is installed.
The library can be configured by setting the following values in
An array of directory paths to be checked to determine whether they are writable during installation (or in the
Each path should start with
public, directory separators (slash or backslash) should not be used at either the beginning or end of a directory path in this array.
The library will automatically replace
application with the absolute value of
public with the absolute value of
An array of file paths to be checked to determine whether they are writable during installation (or in the
The format of these paths should be the same as the format of the
Boolean property to indicate to the install controller whether the default database settings were found.
Boolean property to indicate to the install controller whether the database settings were found/loaded.
The version of the currently-running PHP parser/extension.
Set to the result of
phpversion() by the
Checks an array of files/folders to see if they are writable and returns the results in a format usable in the requirements check step of the installation.
This is called by
check_folders() (both listed below).
If nothing is passed to this method, the default files and folders will be checked, but the returned data will not be separated as expected by the
Note that this method may not currently work properly if you attempt to check files/directories in locations other than
application/, though it will replace paths starting with
application/ with the value of
The files/directories used by this method and the
check_folders() methods by default can be configured in
/application/config/installer_lib.php as arrays in
Determine whether the installed version of PHP is above
true if the installed version is at or above
$version, else it returns
Checks for the existence of the class/function required to use the posted
Attempts to connect ot the database given by the posted settings.
db_available() method fails or the posted settings cause a connection failure, this method will return
Performs some basic checks to determine whether the application has been installed.
Each of the checks below runs in sequence, so later items are not checked if an earlier checks returns a value.
- If /application/config/installed.txt is found, returns
- If the database config could not be found, returns
- If $db['default'] has not been defined by the database config, returns
- If the default database settings could not be found, returns
- If the
'users' table does not exist, returns
- If the
'users' table is empty, returns
- If the method has not returned yet, returns
Determines whether the
curl_init() function exists.
Checks an array of folders to determine whether they are writable and returns the results in a format usable in the requirements check step of the installation process.
$folders is not provided, uses the configured
Checks an array of files to see if they are writable and returns the results in a format usable in the requirements check step of the installation.
$files is not provided, uses the configured
Perform the actual installation:
- Loads the database.
- Installs the Bonfire core migrations.
- Configures the site settings.
- Creates the admin user.
- Creates a unique encryption key for the site.
- Runs any application module migrations.
- Creates the
installed.txt file in
/application/config/ to speed up the process of checking whether the application is installed in the future.
$config['bonfire.installed'] = "1"; to
/application/config/application.php, which is checked by
App_hooks to determine whether certain hooks (which don't work properly during installation) should be run.