Skip to content
sjarvela edited this page Feb 11, 2015 · 13 revisions

Introduction

Mollify app has two configurations

  • Client configuration
  • Backend configuration

Client configuration

Backend configuration

Backend configuration file is located under folder "backend". Example configuration files can be found from "backend/examples".

Syntax of the configuration file is following:

$CONFIGURATION = array(
	"name" => "value",
	"name2" => "value2"
);

All possible configuration options, coming.

At minimum, define option "db" for database configuration, and "plugins" to configure plugins.

For example:

$CONFIGURATION = array(
	"db" => array(
		// DB CONFIGURATION OPTIONS HERE
	),
	// OTHER CONFIGURATION OPTIONS HERE

	"plugins" => array(
		// PLUGIN CONFIGURATION HERE
	)
);

Database

Mollify supports MySQL and SQLite databases, either directly or via PDO interface.

MySQL

Before installing Mollify, you have to create MySQL user and database for Mollify, and grant the new user CREATE/INSERT/UPDATE/DELETE rights for the created database.

$CONFIGURATION = array(
	"db" => array(
		"type" => "mysql",
		"user" => "mollify",
		"password" => "mollify",

		"host" => "localhost", // optional
		"database" => "mollify", // optional
		"table_prefix" => "mollify_", // optional
		"charset" => "utf8" // optional

		"engine" => "innodb" // optional, used only in installation
	),
);

Values "host", "database", "table_prefix" and "engine" are optional. If these are not defined, it is assumed that MySQL server is running on localhost, database is called "mollify" and tables are accessed without name prefix.

With localhost database, you can also provide socket for the connection:

    "socket" => "/tmp/mysql5.sock"

Default MySQL engine used is InnoDB. With option "engine" you can change this (NOTE used only on installation).

    "engine" => "myisam";

Using MySQL via PDO can be configured like this:

$CONFIGURATION = array(
	"db" => array(
		"type" => "pdo",
		"str" => "mysql:host=localhost;dbname=mollify",
		"user" => "mollify",
		"password" => "mollify",

		"table_prefix" => "mollify_", // optional
		"charset" => "utf8" // optional
	),
);

Clone this wiki locally