2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2006 by Greg Gay, Joel Kronenberg, Heidi Hazelton */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
14 define('AT_INCLUDE_PATH', 'include/');
15 error_reporting(E_ALL ^ E_NOTICE);
17 require('../include/lib/constants.inc.php');
19 $new_version = VERSION;
21 header('Cache-Control: no-store, no-cache, must-revalidate');
22 header('Pragma: no-cache');
25 error_reporting(E_ALL);
28 $session_error = ob_get_contents();
30 error_reporting(E_ALL ^ E_NOTICE);
32 require(AT_INCLUDE_PATH.'header.php');
33 $bad = '<img src="images/bad.gif" width="14" height="13" border="0" alt="Bad" title="Bad" />';
34 $good = '<img src="images/feedback.gif" width="16" height="13" border="0" alt="Good" title="Good" />';
38 <h3>Welcome to the ATutor Installation</h3>
39 <p>This process will step you through your ATutor installation or upgrade.</p>
40 <p>During this process be sure not to use your browser's <em>Refresh</em> or <em>Reload</em> feature as it may complicate the installation process.</p>
42 <p>Before you continue you may want to review the <a href="../documentation/admin/" target="_new"><em>ATutor Handbook</em></a> for more detailed instructions.</p>
45 <p>Please review the requirements below before proceeding.</p>
46 <table class="data" style="width: 75%; max-width: 600px;">
49 <th scope="col">File Integrity</th>
50 <th scope="col">Detected</th>
51 <th scope="col">Status</th>
54 <td>Case Sensitivity</td>
55 <td><?php if (file_exists('../include/classes/CSVExport.class.php') && file_exists('../include/classes/csvexport.class.php')) {
56 echo 'Ignored</td><td align="center">';
58 } else if (file_exists('../include/classes/CSVExport.class.php')) {
59 echo 'Enforced</td><td align="center">';
62 echo 'Enforced</td><td align="center">';
70 <th scope="col">PHP Options</th>
71 <th scope="col">Detected</th>
72 <th scope="col">Status</th>
76 <td><?php echo phpversion(); ?></td>
77 <td align="center"><?php if (version_compare(phpversion(), '4.3.0', '>=')) {
85 <td><kbd>zlib</kbd></td>
86 <td><?php if (extension_loaded('zlib')) {
87 echo 'Enabled</td><td align="center">';
90 echo 'Disabled</td><td align="center">';
96 <td><kbd>mysql</kbd></td>
97 <td><?php if (extension_loaded('mysql')) {
98 echo 'Enabled</td><td align="center">';
101 echo 'Disabled</td><td align="center">';
107 <td><kbd>safe_mode = Off</kbd></td>
108 <td><?php if (ini_get('safe_mode')) {
109 echo 'On</td><td align="center">';
113 echo 'Off</td><td align="center">';
118 <td><kbd>file_uploads = On</kbd></td>
119 <td><?php if (ini_get('file_uploads')) {
120 echo 'On</td><td align="center">';
123 echo 'Off</td><td align="center">';
129 <td><kbd>upload_max_filesize</kbd> >= 2 MB</td>
130 <td><?php echo $filesize = ini_get('upload_max_filesize'); ?></td>
131 <td align="center"><?php
132 $filesize_int = intval($filesize);
133 if ("$filesize_int" == $filesize) {
135 if ($filesize_int < 2 * 1024 * 1024) {
140 } else if (stristr($filesize, 'M') !== FALSE) {
141 // value is in MegaBytes
142 if ($filesize_int < 2) {
147 } else if (stristr($filesize, 'K') !== FALSE) {
148 // value is in KiloBytes
149 if ($filesize_int < 2 * 1024) {
154 } else if (stristr($filesize, 'G') !== FALSE) {
155 // value is in GigaBytes
163 <td><kbd>post_max_size</kbd> >= 8 MB</td>
164 <td><?php echo $filesize = ini_get('post_max_size'); ?></td>
165 <td align="center"><?php
166 $filesize_int = intval($filesize);
167 if ("$filesize_int" == $filesize) {
169 if ($filesize_int < 8 * 1024 * 1024) {
174 } else if (stristr($filesize, 'M') !== FALSE) {
175 // value is in MegaBytes
176 if ($filesize_int < 8) {
181 } else if (stristr($filesize, 'K') !== FALSE) {
182 // value is in KiloBytes
183 if ($filesize_int < 8 * 1024) {
188 } else if (stristr($filesize, 'G') !== FALSE) {
189 // value is in GigaBytes
197 <td><kbd>sessions</kbd></td>
198 <td><?php if (extension_loaded('session')) {
199 echo 'Enabled</td><td align="center">';
202 echo 'Disabled</td><td align="center">';
208 <td><kbd>session.auto_start = 0</kbd></td>
209 <td><?php if (ini_get('session.auto_start')) {
210 echo '1</td><td align="center">';
214 echo '0</td><td align="center">';
219 <td><kbd>session.save_path</kbd></td>
221 if ($session_error == '') {
222 echo 'Directory Writeable</td><td align="center">';
225 echo 'Directory Not Writeable</td><td align="center">';
232 <td><kbd>.</kbd> in <kbd>include_path</kbd></td>
234 $include_path = explode(PATH_SEPARATOR, ini_get('include_path'));
235 if (in_array('.', $include_path)) {
236 echo 'Enabled</td><td align="center">';
239 echo 'Disabled</td><td align="center">';
248 <th scope="col">MySQL Options</th>
249 <th scope="col">Detected</th>
250 <th scope="col">Status</th>
253 <td>MySQL 4.0.2+</td>
254 <td><?php if (defined('MYSQL_NUM')) {
255 echo 'Found Unknown Version</td><td align="center">';
258 echo 'Not Found</td><td align="center">';
267 <?php if ($no_good): ?>
268 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
270 <td class="row1"><strong>Your server does not meet the minimum requirements!<br />
271 Please correct the above errors to continue.</strong></td>
275 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
277 <td align="right" class="row1" nowrap="nowrap"><strong>New Installation »</strong></td>
278 <td class="row1" width="150" align="center"><form action="install.php" method="post" name="form">
279 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
280 <input type="submit" class="button" value=" Install " name="next" />
284 <table cellspacing="0" cellpadding="10" align="center" width="45%">
286 <td align="center"><b>Or</b></td>
289 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
291 <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation »</strong></td>
292 <td class="row1" width="150" align="center"><form action="upgrade.php" method="post" name="form">
293 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
294 <input type="submit" class="button" value="Upgrade" name="next" />
300 <?php require(AT_INCLUDE_PATH.'footer.php'); ?>