Configuration

The /config.php file is used to configure the online store. It contains the main constants of the store, which can be edited directly in the file. However, it is much more convenient to do this through the Melbis Shop program (section "System / Installation"). Pay attention to the list of predefined constants given below. They must be taken into account and known when writing scripts:

Constant Default value Description
DB_HOST_NAME localhost Database server address
DB_USER_NAME ms6 Username for the database
DB_USER_PASS 1234 User password for the database
DB_NAME ms6 Database name
DB_NICK ms Prefix for tables in a database
DB_CHARSET utf8 The name of the encoding in which data will be exchanged with the database
DB_COMMAND SET sql_mode = CONCAT(@@sql_mode, ',NO_UNSIGNED_SUBTRACTION'); Commands to run immediately after connecting to the database
TIME_ZONE Europe/Kyiv
Name of the time zone.
SHOP_LOCALE ru_RU.UTF8 Parameter for PHP command: setlocale(LC_CTYPE, SHOP_LOCALE);
DEBUG_CODE code Prefix-password for enabling the debugger (for more details, see " Debugging tools ")
VERSION_CACHE 1000 The number of stored versions of files edited in the "Development Environment". Used for all scripts and templates. The number implies the number of versions for each file, regardless of the age. If the number 0 is specified, then the versions of the edited files are not saved.
OBFUSCATE_URL http://ms6.com/minify.php Automatically calling a script that performs a function with the contents of a file. This primarily involves data obfuscation.
SHOP_CHARSET UTF-8 The name of the encoding for outputting HTML pages
DESKTOP_CHARSET WIN1251 The name of the encoding for store data. Used in the Melbis Shop program.
IP_LIST List of IP addresses from which access to the store is allowed. If the value is missing, it is allowed from any IP.
TEMPLATE default Default template group name
BACKUP_TIME_BEGIN 05:00:00 Start time of blocking access to the store (for backup purposes)
BACKUP_TIME_END 05:30:00 Store access blocking end time
USER_LOG False Activation of the logging mode of all user actions. The data is saved on the server in the DB, table user_log

Example of config.php file contents:

 <?php define('SCRIPT_VERSION', '6.3.0'); define('DB_HOST_NAME', 'localhost'); define('DB_USER_NAME', 'ms6'); define('DB_USER_PASS', '1234'); define('DB_NAME', 'ms6'); define('DB_NICK', 'ms'); define('DB_CHARSET', 'utf8'); define('DB_COMMAND', 'SET OPTION SQL_BIG_SELECTS=1; SET sql_mode=\'NO_UNSIGNED_SUBTRACTION\''); define('SHOP_GMT', '3'); define('SHOP_LOCALE', 'ru_RU.UTF8'); define('DEBUG_CODE', 'code'); define('VERSION_CACHE', '1000'); define('OBFUSCATE_URL', 'http://ms6.com/minify.php'); define('SHOP_CHARSET', 'UTF-8'); define('DESKTOP_CHARSET', 'WIN1251'); define('IP_LIST', ''); define('LICENCE', 'MS6-F827-712A-53DA-AD7C-2239-F3BB-CAE9-7D97'); define('TEMPLATE', 'default'); define('BACKUP_TIME_BEGIN', '05:00:00'); define('BACKUP_TIME_END', '05:30:00'); define('USER_LOG', 'False'); ?>