2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002-2010 */
7 /* This program is free software. You can redistribute it and/or */
8 /* modify it under the terms of the GNU General Public License */
9 /* as published by the Free Software Foundation. */
10 /************************************************************************/
13 define('AT_INCLUDE_PATH', 'include/');
14 error_reporting(E_ALL ^ E_NOTICE);
16 require('../include/lib/constants.inc.php');
18 $new_version = VERSION;
20 header('Cache-Control: no-store, no-cache, must-revalidate');
21 header('Pragma: no-cache');
24 error_reporting(E_ALL);
27 $session_error = ob_get_contents();
29 error_reporting(E_ALL ^ E_NOTICE);
31 require(AT_INCLUDE_PATH.'header.php');
32 $bad = '<img src="images/bad.gif" width="14" height="13" border="0" alt="Bad" title="Bad" />';
33 $good = '<img src="images/feedback.gif" width="16" height="13" border="0" alt="Good" title="Good" />';
34 $warning = '<img src="images/warning.png" width="16" height="16" border="0" alt="Warning" title="Warning" />';
39 <table style="float: right;
40 background-color: #FEFDEF;
41 border: 1pt solid #B8AE9C;
42 margin: 20pt 5pt 5pt 5pt;
47 <tr style="align:center;"><th colspan="2" style="background-color:transparent;">Icon Legend</th></tr>
48 <tr><td><?php echo $good;?></td><td>Pass, can proceed</td></tr>
49 <tr><td><?php echo $warning;?></td><td>Warning but can proceed</td></tr>
50 <tr><td><?php echo $bad;?></td><td>Failed, can not proceed</td></tr>
53 <h3>Welcome to the ATutor Installation</h3>
54 <p>This process will step you through your ATutor installation or upgrade.</p>
55 <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>
57 <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>
60 <p>Please review the requirements below before proceeding.</p>
61 <table class="data" style="width: 75%; max-width: 600px;">
64 <th scope="col">File Integrity</th>
65 <th scope="col">Detected</th>
66 <th scope="col">Status</th>
69 <td>Case Sensitivity</td>
70 <td><?php if (file_exists('../include/classes/CSVExport.class.php') && file_exists('../include/classes/csvexport.class.php')) {
71 echo 'Ignored</td><td align="center">';
73 } else if (file_exists('../include/classes/CSVExport.class.php')) {
74 echo 'Enforced</td><td align="center">';
77 echo 'Enforced</td><td align="center">';
85 <th scope="col">PHP Options</th>
86 <th scope="col">Detected</th>
87 <th scope="col">Status</th>
91 <td><?php echo phpversion(); ?></td>
92 <td align="center"><?php if (version_compare(phpversion(), '4.3.0', '>=')) {
100 <td><kbd>zlib</kbd></td>
101 <td><?php if (extension_loaded('zlib')) {
102 echo 'Enabled</td><td align="center">';
105 echo 'Disabled</td><td align="center">';
111 <td><kbd>mbstring</kbd></td>
112 <td><?php if (extension_loaded('mbstring')) {
113 echo 'Enabled</td><td align="center">';
116 echo 'Disabled</td><td align="center">';
122 <td><kbd>mysql</kbd></td>
123 <td><?php if (extension_loaded('mysql')) {
124 echo 'Enabled</td><td align="center">';
127 echo 'Disabled</td><td align="center">';
133 <td><kbd>safe_mode = Off</kbd></td>
134 <td><?php if (ini_get('safe_mode')) {
135 echo 'On</td><td align="center">';
139 echo 'Off</td><td align="center">';
144 <td><kbd>file_uploads = On</kbd></td>
145 <td><?php if (ini_get('file_uploads')) {
146 echo 'On</td><td align="center">';
149 echo 'Off</td><td align="center">';
155 <td><kbd>GD</kbd></td>
156 <td><?php if (extension_loaded('gd')) {
157 echo 'On</td><td align="center">';
160 echo 'Disabled</td><td align="center">';
164 <?php if (extension_loaded('gd')): $gd_info = gd_info();?>
166 <td><kbd>JPEG Support</kbd></td>
167 <td><?php if ($gd_info['JPG Support'] || $gd_info['JPEG Support']) {
168 echo 'On</td><td align="center">';
171 echo 'Disabled</td><td align="center">';
177 <td><kbd>upload_max_filesize</kbd> >= 2 MB</td>
178 <td><?php echo $filesize = ini_get('upload_max_filesize'); ?></td>
179 <td align="center"><?php
180 $filesize_int = intval($filesize);
181 if ("$filesize_int" == $filesize) {
183 if ($filesize_int < 2 * 1024 * 1024) {
188 } else if (stristr($filesize, 'M') !== FALSE) {
189 // value is in MegaBytes
190 if ($filesize_int < 2) {
195 } else if (stristr($filesize, 'K') !== FALSE) {
196 // value is in KiloBytes
197 if ($filesize_int < 2 * 1024) {
202 } else if (stristr($filesize, 'G') !== FALSE) {
203 // value is in GigaBytes
211 <td><kbd>post_max_size</kbd> >= 8 MB</td>
212 <td><?php echo $filesize = ini_get('post_max_size'); ?></td>
213 <td align="center"><?php
214 $filesize_int = intval($filesize);
215 if ("$filesize_int" == $filesize) {
217 if ($filesize_int < 8 * 1024 * 1024) {
222 } else if (stristr($filesize, 'M') !== FALSE) {
223 // value is in MegaBytes
224 if ($filesize_int < 8) {
229 } else if (stristr($filesize, 'K') !== FALSE) {
230 // value is in KiloBytes
231 if ($filesize_int < 8 * 1024) {
236 } else if (stristr($filesize, 'G') !== FALSE) {
237 // value is in GigaBytes
245 <td><kbd>sessions</kbd></td>
246 <td><?php if (extension_loaded('session')) {
247 echo 'Enabled</td><td align="center">';
250 echo 'Disabled</td><td align="center">';
256 <td><kbd>session.auto_start = 0</kbd></td>
257 <td><?php if (ini_get('session.auto_start')) {
258 echo '1</td><td align="center">';
262 echo '0</td><td align="center">';
267 <td><kbd>session.save_path</kbd></td>
269 if ($session_error == '') {
270 echo 'Directory Writeable</td><td align="center">';
273 echo 'Directory Not Writeable</td><td align="center">';
280 <td><kbd>curl</kbd></td>
282 if (extension_loaded('curl')){
283 echo 'Enabled</td><td align="center">';
286 echo 'Disabled</td><td align="center">';
292 <td><kbd>.</kbd> in <kbd>include_path</kbd></td>
294 $include_path = explode(PATH_SEPARATOR, ini_get('include_path'));
295 if (in_array('.', $include_path)) {
296 echo 'Enabled</td><td align="center">';
299 echo 'Disabled</td><td align="center">';
306 <td>Mail configuration</td>
308 $smtp_server = ini_get('SMTP');
309 if (($smtp_server == '' || $smtp_server == 'localhost') && ini_get('sendmail_path') == '') {
310 echo 'Disabled</td><td align="center">';
313 echo 'Enabled</td><td align="center">';
321 <th scope="col">MySQL Options</th>
322 <th scope="col">Detected</th>
323 <th scope="col">Status</th>
326 <td>MySQL 4.1.10+</td>
327 <td><?php if (defined('MYSQL_NUM')) {
328 $mysql_version = mysql_get_client_info();
329 echo 'Found Version '.$mysql_version.'</td><td align="center">';
332 echo 'Not Found</td><td align="center">';
341 <?php if ($no_good): ?>
342 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
344 <td class="row1"><strong>Your server does not meet the minimum requirements!<br />
345 Please correct the above errors to continue.</strong></td>
348 <?php elseif ($not_as_good): ?>
349 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
351 <td class="row1"><strong>ATutor has indicated that the 'mbstring' library is missing from the PHP. <br />
352 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/>
353 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/>
354 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>
355 <td class="row1"></td>
358 <td align="right" class="row1" nowrap="nowrap"><strong>New Installation »</strong></td>
359 <td class="row1" width="150" align="center">
361 <form action="install.php" method="post" name="form">
362 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
363 <input type="submit" class="button" value=" Install " name="next" disabled="true" />
369 <table cellspacing="0" cellpadding="10" align="center" width="45%">
371 <td align="center"><b>Or</b></td>
374 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
376 <td class="row1"><strong>Upgrading from previous ATutor must have mbstring library installed.</strong></td>
377 <td class="row1"></td>
380 <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation »</strong></td>
381 <td class="row1" width="150" align="center">
382 <input type="button" class="button" value="Upgrade" name="next" disabled="true"/>
387 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
389 <td align="right" class="row1" nowrap="nowrap"><strong>New Installation »</strong></td>
390 <td class="row1" width="150" align="center"><form action="install.php" method="post" name="form">
391 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
392 <input type="submit" class="button" value=" Install " name="next" />
396 <table cellspacing="0" cellpadding="10" align="center" width="45%">
398 <td align="center"><b>Or</b></td>
401 <table cellspacing="0" class="tableborder" cellpadding="1" align="center" width="70%">
403 <td align="right" class="row1" nowrap="nowrap"><strong>Upgrade an Existing Installation »</strong></td>
404 <td class="row1" width="150" align="center"><form action="upgrade.php" method="post" name="form">
405 <input type="hidden" name="new_version" value="<?php echo $new_version; ?>" />
406 <input type="submit" class="button" value="Upgrade" name="next" />
412 <?php require(AT_INCLUDE_PATH.'footer.php'); ?>