Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
install.php File Reference

Functions

 xmldb_search_simpledb_install ()
 Post installation code.
 

Variables

global $CFG
 
 $CFG = new stdClass()
 
if(file_exists('install/distrolib.php')) $config = new stdClass()
 
 $configfile = './config.php'
 
global $COURSE
 
 $COURSE = new stdClass()
 
 $distro = null
 
 $hint_admindir = ''
 
 $hint_database = ''
 
 $hint_dataroot = ''
 
 $languages = get_string_manager()->get_list_of_translations()
 
 $memlimit = @ini_get('memory_limit')
 
global $SESSION
 
global $SITE
 
 $SITE = $COURSE
 
global $USER
 
$config admin = 'admin'
 
$CFG admin = $config->admin
 
const AJAX_SCRIPT false
 
$CFG backuptempdir = $CFG->tempdir.'/backup'
 
const CACHE_DISABLE_ALL true
 
$CFG cachedir = $CFG->dataroot.'/cache'
 
const CLI_SCRIPT (file_exists($configfile)) false
 
$config dataroot = empty($distro->dataroot) ? null : $distro->dataroot
 
$CFG dataroot = $config->dataroot
 
$config dbhost = empty($distro->dbhost) ? 'localhost' : $distro->dbhost
 
$config dbname = 'moodle'
 
$config dbpass = ''
 
$config dbport = empty($distro->dbport) ? '' : $distro->dbport
 
$config dbsocket = empty($distro->dbsocket) ? '' : $distro->dbsocket
 
$config dbtype = empty($distro->dbtype) ? '' : $distro->dbtype
 
$config dbuser = empty($distro->dbuser) ? '' : $distro->dbuser
 
$CFG debug = (E_ALL | E_STRICT)
 
$CFG debugdeveloper = true
 
$CFG debugdisplay = true
 
 die
 
$CFG directorypermissions = isset($distro->directorypermissions) ? $distro->directorypermissions : 00777
 
$CFG dirroot = __DIR__
 
$CFG docroot = 'https://docs.moodle.org'
 
$CFG early_install_lang = true
 
if(isset($_REQUEST['lang'])) else
 This script creates config.php file during installation.
 
if(isset($_REQUEST['admin'])) else
 
if(!function_exists( 'iconv')) if(PHP_INT_SIZE > 4) else
 
if(!empty($_POST)) else
 
if(defined('COMPONENT_CLASSLOADER')) else
 
if($distro) else
 
$CFG filepermissions = ($CFG->directorypermissions & 0666)
 
 foreach ( $languages as $name=> $value) = core_plugin_manager::instance()->get_plugins_of_type('local')
 Add all local plugins - must be always last!
 
$CFG httpswwwroot = $CFG->wwwroot
 
$COURSE id = 1
 
 if (!empty( $memlimit) and $memlimit !=-1)
 
const IGNORE_COMPONENT_CACHE true
 
$config lang = $lang
 
$CFG lang = $config->lang
 
$CFG langlocalroot = $CFG->dataroot.'/lang'
 
$CFG langotherroot = $CFG->dataroot.'/lang'
 
$CFG libdir = "$CFG->dirroot/lib"
 
$CFG localcachedir = $CFG->dataroot.'/localcache'
 
const MDL_PERF false
 
const MDL_PERF_TEST false
 
const MDL_PERFINC false
 
const MDL_PERFTOFOOT false
 
const MDL_PERFTOLOG false
 
const MOODLE_INTERNAL true
 Used by library scripts to check they are being called by Moodle.
 
$CFG ostype = (stristr(PHP_OS, 'win') && !stristr(PHP_OS, 'darwin')) ? 'WINDOWS' : 'UNIX'
 
const PHPUNIT_TEST false
 
$config prefix = 'mdl_'
 
$CFG running_installer = true
 
const SITEID 1
 
if(isset($_GET['help'])) if(is_null( $CFG->dataroot)) if($config->stage< INSTALL_WELCOME) if( $config->stage > INSTALL_SAVE) if($config->stage==INSTALL_SAVE) if( $config->stage==INSTALL_DOWNLOADLANG) if($config->stage==INSTALL_DOWNLOADLANG) if( $config->stage==INSTALL_DATABASETYPE) if($config->stage==INSTALL_DOWNLOADLANG) if( $config->stage==INSTALL_DATABASE) if($config->stage==INSTALL_DATABASETYPE) if( $config->stage==INSTALL_ENVIRONMENT or $config->stage==INSTALL_PATHS) if($config->stage==INSTALL_PATHS) $config stage = INSTALL_WELCOME
 
$CFG target_release = $release
 
$CFG tempdir = $CFG->dataroot.'/temp'
 
$CFG umaskpermissions = (($CFG->directorypermissions & 0777) ^ 0777)
 
$CFG wwwroot = install_guess_wwwroot()