feel free to keep it strictly simple...
config.php and lepton.ini

In LEPTON 4.x we introduce the new config directory in the root of your installation.

The config directory holds the lepton.ini file which contains all information for the database connection, and the config.php.

This prevents both files from being overwritten accidently.

The big advantage of the lepton.ini procedure is, that the db-data is not available as constants during the whole session.

 

 

The lepton.ini is created during installation in config directory and looks like this:

 


[database]
type = 'mysql'
host = 'localhost'
port = '3306'
user = 'db_user'
pass = 'db-password'
name = 'db-name'
prefix = 'table_prefix'

 

 

The config file - also created during installation - looks like:

 

if(defined('LEPTON_PATH')) { die('By security reasons it is not permitted to load 'config.php' twice!! Forbidden call from ''.$_SERVER['SCRIPT_NAME'].''!'); }

// config file created by LEPTON 4.0.0

define('LEPTON_PATH', dirname(__FILE__));
define('LEPTON_URL', ''http://mydomain.tld');
define('ADMIN_PATH', LEPTON_PATH.'/admins');
define('ADMIN_URL', LEPTON_URL.'/admins');

define('LEPTON_GUID', 'e420bbf8-64ae-4336-88cc-c77bcc697c2c');

define('WB_URL', LEPTON_URL);
define('WB_PATH', LEPTON_PATH);

if (!defined('LEPTON_INSTALL')) require_once(LEPTON_PATH.'/framework/initialize.php');

 

 

DB_TYPE
Indicates the database type; nothing to change
DB_HOST
The IP to database; if the same server provides db and apache, you should use localhost
DB_PORT
Port which should be used for connection; default is 3306
DB_USERNAME
Username which can access to the database
DB_PASSWORD
Password for database
DB_NAME
Name of the database; if the user has MySQL creation right, a DB will be created during installation
TABLE_PREFIX
Sets the table prefix; used for several installations of LEPTON with one database, just use a different prefix
LEPTON_PATH
LEPTON_URL
Complete URL with domain to your LEPTON installation
ADMIN_PATH
Relative (from LEPTON_PATH) path to your admin folder; Renaming admins directory, you have to change this as well.
ADMIN_URL
Complete URL to your admin directory; Renaming admins directory, you have to change this as well.
LEPTON_GUID
A unique GUID