| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
/*************************************************************************** |
|---|
| 6 |
* INSERT SYSTEM UNITS HERE |
|---|
| 7 |
* You should ideally not edit this file. |
|---|
| 8 |
****************************************************************************/ |
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
// Sanity checks - conditions under which Elgg will refuse to run |
|---|
| 14 |
// TODO - this'll no doubt want polishing and gettexting :) - Sven |
|---|
| 15 |
|
|---|
| 16 |
$diemessages = array(); |
|---|
| 17 |
|
|---|
| 18 |
if (!defined("path") || (substr(path, -1) != "/")) { |
|---|
| 19 |
$diemessages[] = "Configuration problem: The 'path' setting in includes.php must end with a forward slash (/)."; |
|---|
| 20 |
} |
|---|
| 21 |
if (!defined("url") || (substr(url, -1) != "/")) { |
|---|
| 22 |
$diemessages[] = "Configuration problem: The 'url' setting in includes.php must end with a forward slash (/)."; |
|---|
| 23 |
} |
|---|
| 24 |
if (ini_get('register_globals')) { |
|---|
| 25 |
|
|---|
| 26 |
$diemessages[] = " |
|---|
| 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> |
|---|
| 29 |
If the line is present but has a # at the start, remove the # character. |
|---|
| 30 |
"; |
|---|
| 31 |
} |
|---|
| 32 |
switch ($CFG->dbtype) { |
|---|
| 33 |
case 'mysql': |
|---|
| 34 |
$funcheck = 'mysql_query'; |
|---|
| 35 |
break; |
|---|
| 36 |
case 'postgres7': |
|---|
| 37 |
$funcheck = 'pg_query'; |
|---|
| 38 |
break; |
|---|
| 39 |
} |
|---|
| 40 |
if (!function_exists($funcheck)) { |
|---|
| 41 |
|
|---|
| 42 |
$diemessages[] = " |
|---|
| 43 |
Installation problem: Can't find the PHP MySQL or Postgresql module. |
|---|
| 44 |
Even with PHP and MySQL or Postgresql installed, sometimes the module to connect them is missing. |
|---|
| 45 |
Please check your PHP installation. |
|---|
| 46 |
"; |
|---|
| 47 |
} |
|---|
| 48 |
|
|---|
| 49 |
|
|---|
| 50 |
if (count($diemessages)) { |
|---|
| 51 |
$diebody = '<html><body><h1>Error - Elgg cannot run</h1><ul>'; |
|---|
| 52 |
$diebody .= '<li>' . implode("</li><li>", $diemessages) . '</li>'; |
|---|
| 53 |
$diebody .= '</ul><p>Please read the INSTALL file for more information.</p></body></html>'; |
|---|
| 54 |
die($diebody); |
|---|
| 55 |
} else { |
|---|
| 56 |
unset($diemessages); |
|---|
| 57 |
} |
|---|
| 58 |
|
|---|
| 59 |
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
require($CFG->dirroot . "units/engine/main.php"); |
|---|
| 65 |
|
|---|
| 66 |
require($CFG->dirroot . "units/gettext/main.php"); |
|---|
| 67 |
|
|---|
| 68 |
require($CFG->dirroot . "units/db/main.php"); |
|---|
| 69 |
|
|---|
| 70 |
require($CFG->dirroot . "units/display/main.php"); |
|---|
| 71 |
|
|---|
| 72 |
require($CFG->dirroot . "units/users/main.php"); |
|---|
| 73 |
|
|---|
| 74 |
require($CFG->dirroot . "units/templates/main.php"); |
|---|
| 75 |
|
|---|
| 76 |
require($CFG->dirroot . "units/permissions/main.php"); |
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
include($CFG->dirroot . "units/icons/main.php"); |
|---|
| 80 |
|
|---|
| 81 |
include($CFG->dirroot . "units/profile/main.php"); |
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
include($CFG->dirroot . "units/weblogs/main.php"); |
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
include($CFG->dirroot . "units/files/main.php"); |
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
require($CFG->dirroot . "units/communities/main.php"); |
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
include($CFG->dirroot . "units/friends/main.php"); |
|---|
| 94 |
|
|---|
| 95 |
include($CFG->dirroot . "units/groups/main.php"); |
|---|
| 96 |
|
|---|
| 97 |
|
|---|
| 98 |
require($CFG->dirroot . "units/search/main.php"); |
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
require($CFG->dirroot . "units/invite/main.php"); |
|---|
| 102 |
|
|---|
| 103 |
|
|---|
| 104 |
require($CFG->dirroot . "units/admin/main.php"); |
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
require($CFG->dirroot . "units/xml/main.php"); |
|---|
| 108 |
|
|---|
| 109 |
|
|---|
| 110 |
require($CFG->dirroot . "units/magpie/main.php"); |
|---|
| 111 |
|
|---|
| 112 |
?> |
|---|