Elgg  Version 2.3
ci_installer.php
Go to the documentation of this file.
1 <?php
8 $enabled = getenv('CI') != ''; //are we on an CI environment?
9 
10 if (!$enabled) {
11  echo "This script should be run only in 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  'dbhost' => '127.0.0.1',
31 
32  // We use a wonky dbprefix to catch any cases where folks hardcode "elgg_"
33  // instead of using config->dbprefix
34  'dbprefix' => 'c_i_elgg_',
35 
36  // site settings
37  'sitename' => 'Elgg CI Site',
38  'siteemail' => 'no_reply@ci.elgg.org',
39  'wwwroot' => 'http://localhost:8888/',
40  'dataroot' => getenv('HOME') . '/elgg_data/',
41 
42  // admin account
43  'displayname' => 'Administrator',
44  'email' => 'admin@ci.elgg.org',
45  'username' => 'admin',
46  'password' => 'fancypassword',
47 
48  // timezone
49  'timezone' => 'UTC'
50 );
51 
52 // install and create the .htaccess file
53 $installer->batchInstall($params, true);
54 
56 
58 
59 // at this point installation has completed (otherwise an exception halted execution).
60 echo "Elgg $version install successful" . PHP_EOL;
61 echo "wwwroot: " . elgg_get_config('wwwroot') . PHP_EOL;
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
$version
$installer
static start()
Replacement for loading engine/start.php.
$params
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
$enabled
CI CLI installer script.
Definition: ci_installer.php:8