Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
install
cli
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
require_once(dirname(dirname(__FILE__)) .
"/ElggInstaller.php"
);
23
24
$installer
=
new
ElggInstaller
();
25
26
// none of the following may be empty
27
$params
= array(
28
// database parameters
29
'dbuser'
=>
'root'
,
30
'dbpassword'
=>
'password'
,
31
'dbname'
=>
'elgg'
,
32
33
// site settings
34
'sitename'
=>
'Elgg Travis Site'
,
35
'siteemail'
=>
'no_reply@travis.elgg.org'
,
36
'wwwroot'
=>
'http://travis.elgg.org/'
,
37
'dataroot'
=> getenv(
'HOME'
) .
'/elgg_data/'
,
38
39
// admin account
40
'displayname'
=>
'Administrator'
,
41
'email'
=>
'admin@travis.elgg.org'
,
42
'username'
=>
'admin'
,
43
'password'
=>
'fancypassword'
,
44
);
45
46
// install and create the .htaccess file
47
$installer
->batchInstall(
$params
, TRUE);
48
49
// at this point installation has completed (otherwise an exception halted execution).
50
echo
"Elgg CLI install successful. wwwroot: "
.
elgg_get_config
(
'wwwroot'
) .
"\n"
;
51
elgg_get_config
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
Definition:
configuration.php:86
$params
$params
Definition:
travis_installer.php:27
exit
exit
Definition:
reorder.php:12
$installer
$installer
Definition:
travis_installer.php:24
ElggInstaller
Definition:
ElggInstaller.php:30
$enabled
$enabled
Definition:
travis_installer.php:10
echo
elgg echo
Translates a string.
Definition:
languages.js:43
Generated on Sat Dec 21 2024 00:00:35 for Elgg by
1.8.11