root/releases/0.601/includes_system.php

Revision 394, 3.8 kB (checked in by sven, 2 years ago)

2 trivial edits

  • Property svn:eol-style set to native
Line 
1 <?php
2
3     // ELGG system includes
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         // this shouldn't be needed due to the htaccess file, but just in case...
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         // people have been having a spot of trouble installing elgg without the mysql php module...
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     // Plug-in engine (must be loaded first)
64         require($CFG->dirroot . "units/engine/main.php");
65     // Language / internationalisation
66         require($CFG->dirroot . "units/gettext/main.php");
67     // Database
68         require($CFG->dirroot . "units/db/main.php");
69     // Display
70         require($CFG->dirroot . "units/display/main.php");
71     // Users
72         require($CFG->dirroot . "units/users/main.php");
73     // Templates
74         require($CFG->dirroot . "units/templates/main.php");
75     // Edit permissions
76         require($CFG->dirroot . "units/permissions/main.php");
77         
78     // User icons
79         include($CFG->dirroot . "units/icons/main.php");
80     // Profiles
81         include($CFG->dirroot . "units/profile/main.php");
82         
83     // Weblog
84         include($CFG->dirroot . "units/weblogs/main.php");
85     
86     // File repository
87         include($CFG->dirroot . "units/files/main.php");
88                 
89     // Communities
90         require($CFG->dirroot . "units/communities/main.php");
91         
92     // Friends
93         include($CFG->dirroot . "units/friends/main.php");
94     // Friend groups
95         include($CFG->dirroot . "units/groups/main.php");
96         
97     // Search
98         require($CFG->dirroot . "units/search/main.php");
99         
100     // Invite-a-friend
101         require($CFG->dirroot . "units/invite/main.php");
102         
103     // Admin system
104         require($CFG->dirroot . "units/admin/main.php");
105         
106     // XML parsing
107         require($CFG->dirroot . "units/xml/main.php");
108         
109     // Your Resources
110         require($CFG->dirroot . "units/magpie/main.php");
111         
112 ?>
Note: See TracBrowser for help on using the browser.