Example #1
0
api_check_php_version('../inc/');

/*		INITIALIZATION SECTION */

ob_implicit_flush(true);
session_start();

require_once api_get_path(SYS_PATH).'main/inc/autoload.inc.php';
require_once api_get_path(LIBRARY_PATH).'database.lib.php';
require_once api_get_path(LIBRARY_PATH).'log.class.php';
require_once 'install.lib.php';
require_once 'install.class.php';
require_once 'i_database.class.php';

// This value is use in database::query in order to prompt errors in the error log (course databases)
Database::$log_queries = true;

// The function api_get_setting() might be called within the installation scripts.
// We need to provide some limited support for it through initialization of the
// global array-type variable $_setting.
$_setting = array(
	'platform_charset' => 'UTF-8',
	'server_type' => 'production', // 'production' | 'test'
	'permissions_for_new_directories' => '0770',
	'permissions_for_new_files' => '0660',
	'stylesheets' => 'chamilo'
);

// Determination of the language during the installation procedure.
if (!empty($_POST['language_list'])) {
	$search = array('../', '\\0');