Skip to content
Snippets Groups Projects
Commit 7697e7f8 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Adding a new check your php configuration section on the frontpage of the installation

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@341 44740490-163a-0410-bde0-09ae8108e29a
parent 3c957a3f
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
<div id="content">
<div class="enablebox">
<div class="enablebox mini">
<table>
<?php
......@@ -76,6 +76,28 @@ $icon_disabled = '<img src="/' . $data['baseurlpath'] . 'resources/icons/delete.
}
?>
<h2>Checking your PHP installation</h2>
<div class="enablebox">
<table>
<?php
$icon_enabled = '<img src="/' . $data['baseurlpath'] . 'resources/icons/accept.png" alt="enabled" />';
$icon_disabled = '<img src="/' . $data['baseurlpath'] . 'resources/icons/delete.png" alt="disabled" />';
foreach ($this->data['funcmatrix'] AS $func) {
echo '<tr class="' . ($func['enabled'] ? 'enabled' : 'disabled') . '"><td>' . ($func['enabled'] ? $icon_enabled : $icon_disabled) . '</td>
<td>' . $func['required'] . '</td><td>' . $func['descr'] . '</td></tr>';
}
?>
</table>
</div>
<h2>About simpleSAMLphp</h2>
<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it? You can find more information about <a href="http://rnd.feide.no/simplesamlphp">simpleSAMLphp at the Feide RnD blog</a> over at <a href="http://uninett.no">UNINETT</a>.</p>
......
......@@ -127,6 +127,25 @@ $enablematrix = array(
);
$functionchecks = array(
'hash' => array('required', 'Hashing function'),
'gzinflate' => array('required', 'ZLib'),
'openssl_sign' => array('required', 'OpenSSL'),
'simplexml_import_dom' => array('required', 'SimpleXML'),
'dom_import_simplexml' => array('required', 'XML DOM'),
'preg_match' => array('required', 'RegEx support'),
'ldap_bind' => array('required for LDAP auth module', 'LDAP Extension'),
'radius_auth_open' => array('required for Radius auth module', 'Radius Extension'),
'mcrypt_module_open'=> array('optional', 'MCrypt'),
);
$funcmatrix = array();
$funcmatrix[] = array('required' => 'required', 'descr' => 'PHP Version >= 5.1.2. You run: ' . phpversion(), 'enabled' => version_compare(phpversion(), '5.1.2', '>='));
$funcmatrix[] = array('required' => 'reccomended', 'descr' => 'PHP Version >= 5.2', 'enabled' => version_compare(phpversion(), '5.2', '>='));
foreach ($functionchecks AS $func => $descr) {
$funcmatrix[] = array('descr' => $descr[1], 'required' => $descr[0], 'enabled' => function_exists($func));
}
$t = new SimpleSAML_XHTML_Template($config, 'frontpage.php');
$t->data['header'] = 'simpleSAMLphp installation page';
$t->data['icon'] = 'compass_l.png';
......@@ -135,6 +154,7 @@ $t->data['links'] = $links;
$t->data['links_meta'] = $linksmeta;
$t->data['links_doc'] = $linksdoc;
$t->data['enablematrix'] = $enablematrix;
$t->data['funcmatrix'] = $funcmatrix;
$t->show();
......
......@@ -219,9 +219,12 @@ th.rowtitle {
}
.enablebox table {
border: 1px solid #eee;
float: right;
margin-left: 1em;
}
.enablebox.mini table {
float: right;
}
.enablebox tr td {
padding: .5px 1em 1px .5em;
margin: 0px;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment