1 <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="en" lang
="en">
3 <head
><title
>RackTables installation
</title
>
4 <link rel
=stylesheet type
='text/css' href
=pi
.css
/>
9 function already_installed()
14 function test_install_step ($stepno)
18 // Step 0. Check if the software is already installed.
22 // Step 1. Check for PHP extensions.
25 echo "<table border=1><tr><th>check item</th><th>result</th></tr>\n";
27 echo '<tr><td>PDO extension</td>';
28 if (class_exists ('PDO'))
29 echo '<td class=msg_success>Ok';
32 echo '<td class=msg_error>not found';
37 echo '<tr><td>PDO-MySQL</td>';
38 if (defined ('PDO::MYSQL_ATTR_READ_DEFAULT_FILE'))
39 echo '<td class=msg_success>Ok';
42 echo '<td class=msg_error>not found';
47 echo '<tr><td>hash functions</td>';
48 if (function_exists ('hash_algos'))
49 echo '<td class=msg_success>Ok';
52 echo '<td class=msg_error>not found';
57 echo '<tr><td>SNMP extension</td>';
58 if (defined ('SNMP_NULL'))
59 echo '<td class=msg_success>Ok';
61 echo '<td class=msg_warning>Not found. Live SNMP tab will not function properly until the extension is installed.';
64 echo '<tr><td>GD functions</td>';
65 if (defined ('GD_VERSION'))
66 echo '<td class=msg_success>Ok';
69 echo '<td class=msg_error>not found';
77 // Step 2. Check that we can write to configuration file.
81 // Step 3. Ask for DB connection paramaters and test
82 // the connection. Neither save the parameters nor allow
83 // going further until we succeed with the given
89 die ("Unexpected argument '${stepno}'");
93 //********************************** START **************
94 if (isset ($_REQUEST['step']))
95 $next_step = $_REQUEST['step'];
96 elseif (!already_installed())
99 die ('Already installed.');
101 $result = test_install_step ($next_step);