Example #1
0
<?php

// *******************************************
// *** Database configuration (important!) ***
// *******************************************
require dirname(__FILE__) . '/PmInterface.php';
$interface = new \Paasmaker\PmInterface(array('../my-project.yml'), TRUE);
$service = $interface->getService('rsssql');
define('DB_TYPE', 'mysql');
// or "pgsql"
define('DB_RAW_HOST', $service['hostname']);
define('DB_USER', $service['username']);
define('DB_NAME', $service['database']);
define('DB_PASS', $service['password']);
define('DB_PORT', $service['port']);
define('MYSQL_CHARSET', 'UTF8');
// Connection charset for MySQL. If you have a legacy database and/or experience
// garbage unicode characters with this option, try setting it to a blank string.
// ***********************************
// *** Basic settings (important!) ***
// ***********************************
if (array_key_exists('HTTP_HOST', $_SERVER)) {
    define('SELF_URL_PATH', 'http://' . $_SERVER['HTTP_HOST'] . '/');
} else {
    define('SELF_URL_PATH', 'http://localhost/');
}
// Full URL of your tt-rss installation. This should be set to the
// location of tt-rss directory, e.g. http://yourserver/tt-rss/
// You need to set this option correctly otherwise several features
// including PUSH, bookmarklets and browser integration will not work properly.
define('FEED_CRYPT_KEY', 'chooseyourown-exactly24chars');
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information
 * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don't have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */
require 'PmInterface.php';
$interface = new \Paasmaker\PmInterface(array());
// This service name matches what you put in your manfiest file.
$databaseService = $interface->getService('wordpresssql');
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', $databaseService['database']);
/** MySQL database username */
define('DB_USER', $databaseService['username']);
/** MySQL database password */
define('DB_PASSWORD', $databaseService['password']);
/** MySQL hostname */
define('DB_HOST', $databaseService['hostname'] . ":" . $databaseService['port']);
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');