Elgg  Version 2.3
travis_installer.php
Go to the documentation of this file.
1 <?php
8 $enabled = getenv('TRAVIS') != ''; //are we on Travis?
9 
10 if (!$enabled) {
11  echo "This script should be run only in Travis CI test environment.\n";
12  exit(1);
13 }
14 
15 if (PHP_SAPI !== 'cli') {
16  echo "You must use the command line to run this script.\n";
17  exit(2);
18 }
19 
20 require_once __DIR__ . "/../../autoloader.php";
21 
23 
24 // none of the following may be empty
25 $params = array(
26  // database parameters
27  'dbuser' => 'root',
28  'dbpassword' => 'password',
29  'dbname' => 'elgg',
30 
31  // We use a wonky dbprefix to catch any cases where folks hardcode "elgg_"
32  // instead of using config->dbprefix
33  'dbprefix' => 't_i_elgg_',
34 
35  // site settings
36  'sitename' => 'Elgg Travis Site',
37  'siteemail' => 'no_reply@travis.elgg.org',
38  'wwwroot' => 'http://localhost:8888/',
39  'dataroot' => getenv('HOME') . '/elgg_data/',
40 
41  // admin account
42  'displayname' => 'Administrator',
43  'email' => 'admin@travis.elgg.org',
44  'username' => 'admin',
45  'password' => 'fancypassword',
46 
47  // timezone
48  'timezone' => 'UTC'
49 );
50 
51 // install and create the .htaccess file
52 $installer->batchInstall($params, true);
53 
55 
57 
58 // at this point installation has completed (otherwise an exception halted execution).
59 echo "Elgg $version install successful" . PHP_EOL;
60 echo "wwwroot: " . elgg_get_config('wwwroot') . PHP_EOL;
61 
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
$installer
$enabled
Travis CI CLI installer script.
static start()
Replacement for loading engine/start.php.
elgg echo
Translates a string.
Definition: languages.js:48
elgg_get_version($human_readable=false)
Get the current Elgg version information.
Definition: elgglib.php:1071
exit
Definition: autoloader.php:34