3 // ELGG system includes
5 /***************************************************************************
6 * INSERT SYSTEM UNITS HERE
7 * You should ideally not edit this file.
8 ****************************************************************************/
13 // Sanity checks - conditions under which Elgg will refuse to run
14 // TODO - this'll no doubt want polishing and gettexting :) - Sven
16 $diemessages = array();
18 if (!defined("path") ||
(substr(path
, -1) != "/")) {
19 $diemessages[] = "Configuration problem: The 'path' setting in includes.php must end with a forward slash (/).";
21 if (!defined("url") ||
(substr(url
, -1) != "/")) {
22 $diemessages[] = "Configuration problem: The 'url' setting in includes.php must end with a forward slash (/).";
24 if (ini_get('register_globals')) {
25 // this shouldn't be needed due to the htaccess file, but just in case...
27 Configuration problem: The PHP setting 'register_globals', which is a huge security risk, is turned on.
28 There should be a line in the .htaccess file as follows: <code>php_flag register_globals off</code>
31 if (!ini_get('magic_quotes_gpc')) {
32 // this shouldn't be needed due to the htaccess file, but just in case...
34 Configuration problem: The PHP setting 'magic_quotes_gpc' is turned off.
35 There should be a line in the .htaccess file as follows: <code>php_flag magic_quotes_gpc on</code>
38 if (!function_exists('mysql_query')) {
39 // people have been having a spot of trouble installing elgg without the mysql php module...
41 Installation problem: Can't find the PHP MySQL module.
42 Even with PHP and MySQL installed, sometimes the module to connect them is missing.
43 Please check your PHP installation.
48 if (count($diemessages)) {
49 $diebody = '<html><body><h1>Error - Elgg cannot run</h1><ul>';
50 $diebody .= '<li>' . implode("</li><li>", $diemessages) . '</li>';
51 $diebody .= '</ul><p>Please read the INSTALL file for more information.</p></body></html>';
60 if (!defined("ELGG_DEBUG")) {
61 define("ELGG_DEBUG", false);
63 if (ELGG_DEBUG
=== true) {
64 error_reporting(E_ALL ^ E_NOTICE
);
65 ini_set("display_errors", true);
71 // Plug-in engine (must be loaded first)
72 require(path
. "units/engine/main.php");
73 // Language / internationalisation
74 require(path
. "units/gettext/main.php");
76 require(path
. "units/db/main.php");
78 require(path
. "units/display/main.php");
80 require(path
. "units/users/main.php");
82 require(path
. "units/templates/main.php");
84 require(path
. "units/permissions/main.php");
87 include(path
. "units/icons/main.php");
89 include(path
. "units/profile/main.php");
92 include(path
. "units/weblogs/main.php");
94 include(path
. "units/files/main.php");
97 require(path
. "units/communities/main.php");
100 include(path
. "units/friends/main.php");
102 include(path
. "units/groups/main.php");
105 require(path
. "units/network/main.php");
108 require(path
. "units/search/main.php");
111 require(path
. "units/invite/main.php");
114 require(path
. "units/admin/main.php");
117 require(path
. "units/xml/main.php");
120 require(path
. "units/magpie/main.php");