root/releases/0.6/includes_system.php

Revision 314, 3.7 kB (checked in by carmartin, 2 years ago)

magic_quotes_gpc: Now that we don't really want them on... don't complain about them!

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>

  • 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         ";
30     }
31     switch ($CFG->dbtype) {
32         case 'mysql':
33             $funcheck = 'mysql_query';
34             break;
35         case 'postgres7':
36             $funcheck = 'pg_query';
37             break;
38     }
39     if (!function_exists($funcheck)) {
40         // people have been having a spot of trouble installing elgg without the mysql php module...
41         $diemessages[] = "
42             Installation problem: Can't find the PHP MySQL or Postgresql module.
43             Even with PHP and MySQL or Postgresql installed, sometimes the module to connect them is missing.
44             Please check your PHP installation.
45         ";
46     }
47     
48     
49     if (count($diemessages)) {
50         $diebody  = '<html><body><h1>Error - Elgg cannot run</h1><ul>';
51         $diebody .= '<li>' . implode("</li><li>", $diemessages) . '</li>';
52         $diebody .= '</ul><p>Please read the INSTALL file for more information.</p></body></html>';
53         die($diebody);
54     } else {
55         unset($diemessages);
56     }
57     
58     
59     
60     
61     
62     // Plug-in engine (must be loaded first)
63         require($CFG->dirroot . "units/engine/main.php");
64     // Language / internationalisation
65         require($CFG->dirroot . "units/gettext/main.php");
66     // Database
67         require($CFG->dirroot . "units/db/main.php");
68     // Display
69         require($CFG->dirroot . "units/display/main.php");
70     // Users
71         require($CFG->dirroot . "units/users/main.php");
72     // Templates
73         require($CFG->dirroot . "units/templates/main.php");
74     // Edit permissions
75         require($CFG->dirroot . "units/permissions/main.php");
76         
77     // User icons
78         include($CFG->dirroot . "units/icons/main.php");
79     // Profiles
80         include($CFG->dirroot . "units/profile/main.php");
81         
82     // Weblog
83         include($CFG->dirroot . "units/weblogs/main.php");
84     
85     // File repository
86         include($CFG->dirroot . "units/files/main.php");
87                 
88     // Communities
89         require($CFG->dirroot . "units/communities/main.php");
90         
91     // Friends
92         include($CFG->dirroot . "units/friends/main.php");
93     // Friend groups
94         include($CFG->dirroot . "units/groups/main.php");
95         
96     // Search
97         require($CFG->dirroot . "units/search/main.php");
98         
99     // Invite-a-friend
100         require($CFG->dirroot . "units/invite/main.php");
101         
102     // Admin system
103         require($CFG->dirroot . "units/admin/main.php");
104         
105     // XML parsing
106         require($CFG->dirroot . "units/xml/main.php");
107         
108     // Your Resources
109         require($CFG->dirroot . "units/magpie/main.php");
110         
111 ?>
Note: See TracBrowser for help on using the browser.