2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2008 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" />';
39 <h3>Welcome to the ATutor Installation</h3>
40 <p>This process will step you through your ATutor installation or upgrade.</p>
41 <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>
43 <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>
46 <p>Please review the requirements below before proceeding.</p>
47 <table class="data" style="width: 75%; max-width: 600px;">
50 <th scope="col">File Integrity</th>
51 <th scope="col">Detected</th>
52 <th scope="col">Status</th>
55 <td>Case Sensitivity</td>
56 <td><?php if (file_exists('../include/classes/CSVExport.class.php') && file_exists('../include/classes/csvexport.class.php')) {
57 echo 'Ignored</td><td align="center">';
59 } else if (file_exists('../include/classes/CSVExport.class.php')) {
60 echo 'Enforced</td><td align="center">';
63 echo 'Enforced</td><td align="center">';
71 <th scope="col">PHP Options</th>
72 <th scope="col">Detected</th>
73 <th scope="col">Status</th>
77 <td><?php echo phpversion(); ?></td>
78 <td align="center"><?php if (version_compare(phpversion(), '4.3.0', '>=')) {
86 <td><kbd>zlib</kbd></td>
87 <td><?php if (extension_loaded('zlib')) {
88 echo 'Enabled</td><td align="center">';
91 echo 'Disabled</td><td align="center">';
97 <td><kbd>mbstring</kbd></td>
98 <td><?php if (extension_loaded('mbstring')) {
99 echo 'Enabled</td><td align="center">';
102 echo 'Disabled</td><td align="center">';
108 <td><kbd>mysql</kbd></td>
109 <td><?php if (extension_loaded('mysql')) {
110 echo 'Enabled</td><td align="center">';
113 echo 'Disabled</td><td align="center">';
119 <td><kbd>safe_mode = Off</kbd></td>
120 <td><?php if (ini_get('safe_mode')) {
121 echo 'On</td><td align="center">';
125 echo 'Off</td><td align="center">';
130 <td><kbd>file_uploads = On</kbd></td>
131 <td><?php if (ini_get('file_uploads')) {
132 echo 'On</td><td align="center">';
135 echo 'Off</td><td align="center">';
141 <td><kbd>upload_max_filesize</kbd> >= 2 MB</td>
142 <td><?php echo $filesize = ini_get('upload_max_filesize'); ?></td>
143 <td align="center"><?php
144 $filesize_int = intval($filesize);
145 if ("$filesize_int" == $filesize) {
147 if ($filesize_int < 2 * 1024 * 1024) {
152 } else if (stristr($filesize, 'M') !== FALSE) {
153 // value is in MegaBytes
154 if ($filesize_int < 2) {
159 } else if (stristr($filesize, 'K') !== FALSE) {
160 // value is in KiloBytes
161 if ($filesize_int < 2 * 1024) {
166 } else if (stristr($filesize, 'G') !== FALSE) {
167 // value is in GigaBytes
175 <td><kbd>post_max_size</kbd> >= 8 MB</td>
176 <td><?php echo $filesize = ini_get('post_max_size'); ?></td>
177 <td align="center"><?php
178 $filesize_int = intval($filesize);
179 if ("$filesize_int" == $filesize) {
181 if ($filesize_int < 8 * 1024 * 1024) {
186 } else if (stristr($filesize, 'M') !== FALSE) {
187 // value is in MegaBytes
188 if ($filesize_int < 8) {
193 } else if (stristr($filesize, 'K') !== FALSE) {
194 // value is in KiloBytes
195 if ($filesize_int < 8 * 1024) {
200 } else if (stristr($filesize, 'G') !== FALSE) {
201 // value is in GigaBytes
209 <td><kbd>sessions</kbd></td>
210 <td><?php if (extension_loaded('session')) {
211 echo 'Enabled</td><td align="center">';
214 echo 'Disabled</td><td align="center">';
220 <td><kbd>session.auto_start = 0</kbd></td>
221 <td><?php if (ini_get('session.auto_start')) {
222 echo '1</td><td align="center">';
226 echo '0</td><td align="center">';
231 <td><kbd>session.save_path</kbd></td>
233 if ($session_error == '') {
234 echo 'Directory Writeable</td><td align="center">';
237 echo 'Directory Not Writeable</td><td align="center">';
244 <td><kbd>.</kbd> in <kbd>include_path</kbd></td>
246 $include_path = explode(PATH_SEPARATOR, ini_get('include_path'));
247 if (in_array('.', $include_path)) {
248 echo 'Enabled</td><td align="center">';
251 echo 'Disabled</td><td align="center">';
260 <th scope="col">MySQL Options</th>
261 <th scope="col">Detected</th>
262 <th scope="col">Status</th>
265 <td>MySQL 4.1.10+</td>
266 <td><?php if (defined('MYSQL_NUM')) {
267 $mysql_version = mysql_get_client_info();
268 echo 'Found Version '.$mysql_version.'</td><td align="center">';
271 echo 'Not Found</td><td align="center">';
280 <?php if ($no_good): ?>
281 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
283 <td class="row1"><strong>Your server does not meet the minimum requirements!<br />
284 Please correct the above errors to continue.</strong></td>
287 <?php elseif ($not_as_good): ?>
288 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
290 <td class="row1"><strong>ATutor has indicated that the 'mbstring' library is missing from the PHP. <br />
291 We strongly encourage you to install the 'mbstring' library before continuing, however, if you choose not to install the library from PHP, a third party library within ATutor will be used. <br/><br/>
292 For production systems, we strongly encourage you to install the PHP with <a href="http://ca.php.net/manual/en/ref.mbstring.php" target="php_site">mbstring</a> support. <br/><br/>
293 You may choose to by pass the mbstring check for the installation at your own risk by clicking <a href="javascript:void(0);" onclick="javascript:document.form.next.disabled=false;">continue</a>.</strong></td>
294 <td class="row1"></td>
297 <td align="right" class="row1" nowrap="nowrap"><strong>New Installation »</strong></td>
298 <td class="row1" width="150" align="center">
300 <form action="install.php" method="post" name="form">
301 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
302 <input type="submit" class="button" value=" Install " name="next" disabled="true" />
308 <table cellspacing="0" cellpadding="10" align="center" width="45%">
310 <td align="center"><b>Or</b></td>
313 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
315 <td class="row1"><strong>Upgrading from previous ATutor must have mbstring library installed.</strong></td>
316 <td class="row1"></td>
319 <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation »</strong></td>
320 <td class="row1" width="150" align="center">
321 <input type="button" class="button" value="Upgrade" name="next" disabled="true"/>
326 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
328 <td align="right" class="row1" nowrap="nowrap"><strong>New Installation »</strong></td>
329 <td class="row1" width="150" align="center"><form action="install.php" method="post" name="form">
330 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
331 <input type="submit" class="button" value=" Install " name="next" />
335 <table cellspacing="0" cellpadding="10" align="center" width="45%">
337 <td align="center"><b>Or</b></td>
340 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
342 <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation »</strong></td>
343 <td class="row1" width="150" align="center"><form action="upgrade.php" method="post" name="form">
344 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
345 <input type="submit" class="button" value="Upgrade" name="next" />
351 <?php require(AT_INCLUDE_PATH.'footer.php'); ?>