Skip to content

Instantly share code, notes, and snippets.

@mneuhaus
Created April 30, 2013 07:32
Show Gist options
  • Save mneuhaus/5487163 to your computer and use it in GitHub Desktop.
Save mneuhaus/5487163 to your computer and use it in GitHub Desktop.
TYPO3:
Flow:
persistence:
backendOptions:
host: %PAAS_HOST%
dbname: %PAAS_DB%
user: %PAAS_USER%
password: %PAAS_PASSWORD%
<?php
/* *
* This script belongs to the TYPO3 Flow framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
* */
define('PAAS_HOST', $_SERVER["DB1_HOST"]);
define('PAAS_DB', $_SERVER["DB1_NAME"]);
define('PAAS_USER', $_SERVER["DB1_USER"]);
define('PAAS_PASSWORD', $_SERVER["DB1_PASS"]);
$rootPath = isset($_SERVER['FLOW_ROOTPATH']) ? $_SERVER['FLOW_ROOTPATH'] : FALSE;
if ($rootPath === FALSE && isset($_SERVER['REDIRECT_FLOW_ROOTPATH'])) {
$rootPath = $_SERVER['REDIRECT_FLOW_ROOTPATH'];
}
if ($rootPath === FALSE) {
$rootPath = dirname(__FILE__) . '/../';
} elseif (substr($rootPath, -1) !== '/') {
$rootPath .= '/';
}
require($rootPath . 'Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Core/Bootstrap.php');
$context = getenv('FLOW_CONTEXT') ?: (getenv('REDIRECT_FLOW_CONTEXT') ?: 'Development');
$bootstrap = new \TYPO3\Flow\Core\Bootstrap($context);
$bootstrap->run();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment