Skip to content

Configuration

Jiří Škoda edited this page Mar 27, 2024 · 34 revisions

This page describes contents of CONFIG.YAML file, which can be found at root directory of PHP-Movic. Generally, there is no order of those settings. So, you can rearrange them in your way.

Content
1. General configuration
2. Logging configuration
3. Database configuration

General configuration

This part contains configuration which is general for whole application.

DateFormat

Syntax: DateFormat: "<format>"
Parameters:

  • <format>: Format string.

Sets format of date and time used across whole application. For format string options, see date format wiki page.

PHPErrors

Syntax: PHPErrors: <value>
Parameters:

  • <value>: Boolean value(True or False).

Sets flag, whether PHP errors should be emitted (True) or not (False).

Logging configuration

Configuration of logging of application. PHP-Movic creates quite good amount of logs. This settings can change behaviour of logs.

LogsAllowed

Syntax: LogsAllowed: <allowed>

  • <allowed>: Boolean (True or False).

Sets flag, whether application should create logs (True) or not (False).

LogLevel

Syntax: LogLevel: <level>
Parameters:

  • <level>: Level of log.

Sets minimal level of log, which will be actually logged. Allowed log values:

  • LOW
  • BASE
  • INFO
  • SUCCESS
  • WARNING
  • ERROR
  • CRITICAL

LogDir

Syntax: LogDir: "<path>"
Parameters:

  • <path>: Path to directory.

Sets path to directory, to which all logs will be created.

LogStdout

Syntax: LogStdout: <stdout>
Parameters:

  • <stdout>: Boolean (True for logging to standard output, False for otherwise)

Sets flag, whether logs should be printed also to standard output.

LogFormat

Syntax: LogFormat: "<format>"
Parameters:

  • <format>: Format string

Sets format of each log. Specification of format string can be found at log format wiki page.

LogUseFormat

Syntax: LogUseFormat: <use>
Parameters:

Flag, whether any of format symbols will be used when logging to file.

LogLevelFormat

Syntax:

LogLevelFormat:    
     <level>: "<format>"
     <level>: "<format>"
     <level>: "<format>"
     ...

Parameters:

  • <level>: Any valid level of log
  • <format>: Format of log

Sets format of log for each level of log. As <format>, valid log format is expected. For log level, any of following is valid:

  • LOW
  • BASE
  • INFO
  • SUCCESS
  • WARNING
  • ERROR
  • CRITICAL

Database configuration

This part is dedicated to configuration of database. As this file contains database password in plain text, is really important to hide this file from public distribution.

DatabaseHost

Syntax: DatabaseHost: "<hostname>"
Parameters:

  • <hostname>: Name or IP address.

Sets name or address of machine with running database service. To this machine will application connect for executing database queries.

DatabaseName

Syntax: DatabaseName: "<database>"
Parameters:

  • <database>: Name of database.

Sets name of database on database server which will be used by application and to which application will connect to.

DatabaseUser

Syntax: DatabaseUser: "<user>"
Parameters:

  • <user>: Name of user.

Sets name of user used to connect to the database. When configuring this setting, please keep in mind, that this user needs permission to actually perform queries.

DatabasePassword

Syntax: DatabasePassword: "<password>"
Parameters:

  • <password>: Password in plain text.

Sets password of database user used for connecting to the database.

Clone this wiki locally