Elgg  Version 1.11
travis_installer.php
Go to the documentation of this file.
1 <?php
10 $enabled = getenv('TRAVIS') != '';//are we on Travis?
11 
12 if (!$enabled) {
13  echo "This script should be run only in Travis CI test environment.\n";
14  exit(1);
15 }
16 
17 if (PHP_SAPI !== 'cli') {
18  echo "You must use the command line to run this script.\n";
19  exit(2);
20 }
21 
22 $elggRoot = dirname(dirname(__DIR__));
23 
24 require_once "$elggRoot/vendor/autoload.php";
25 
27 
28 // none of the following may be empty
29 $params = array(
30  // database parameters
31  'dbuser' => 'root',
32  'dbpassword' => 'password',
33  'dbname' => 'elgg',
34  'dbprefix' => 't_i_elgg_',
35 
36  // site settings
37  'sitename' => 'Elgg Travis Site',
38  'siteemail' => 'no_reply@travis.elgg.org',
39  'wwwroot' => 'http://localhost:8888/',
40  'dataroot' => getenv('HOME') . '/elgg_data/',
41 
42  // admin account
43  'displayname' => 'Administrator',
44  'email' => 'admin@travis.elgg.org',
45  'username' => 'admin',
46  'password' => 'fancypassword',
47 );
48 
49 // install and create the .htaccess file
50 $installer->batchInstall($params, TRUE);
51 
52 // at this point installation has completed (otherwise an exception halted execution).
53 echo "Elgg CLI install successful. wwwroot: " . elgg_get_config('wwwroot') . "\n";
54 
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
exit
Definition: reorder.php:12
$installer
if(!$enabled) if(PHP_SAPI!== 'cli') $elggRoot
elgg echo
Translates a string.
Definition: languages.js:43