mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
2f9bfae1f9
Modified ConfigureFromEnv.php to parse SS_DATABASE_SSL variables (also added a bit of documentation) Modified PDOConnector.php to implement variables set in ConfigureFromEnv if exists Modified install files MySQLDatabaseConfigurationHelper and install.php5 to accept and implement SS_DATABASE_SSL variables set in _ss_environment.php TODO: Add documentation
24 lines
678 B
PHP
Executable File
24 lines
678 B
PHP
Executable File
<?php
|
|
|
|
// CLI specific bootstrapping
|
|
use SilverStripe\Control\CLIRequestBuilder;
|
|
use SilverStripe\Control\HTTPApplication;
|
|
use SilverStripe\Core\CoreKernel;
|
|
|
|
require __DIR__ . '/src/includes/autoload.php';
|
|
|
|
// Ensure that people can't access this from a web-server
|
|
if (!in_array(PHP_SAPI, ["cli", "cgi", "cgi-fcgi"])) {
|
|
echo "cli-script.php can't be run from a web request, you have to run it on the command-line.";
|
|
die();
|
|
}
|
|
|
|
// Build request and detect flush
|
|
$request = CLIRequestBuilder::createFromEnvironment();
|
|
|
|
// Default application
|
|
$kernel = new CoreKernel(BASE_PATH);
|
|
$app = new HTTPApplication($kernel);
|
|
$response = $app->handle($request);
|
|
$response->output();
|