Skip to content

Commit

Permalink
Oops, recently removed check for PHP xml extension by mistake... it i…
Browse files Browse the repository at this point in the history
…s still required!
  • Loading branch information
h9k committed Feb 12, 2018
1 parent 91d71e1 commit e3122a9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -18,7 +18,7 @@ In case you want to migrate from Denora to Anope, we created a script for this t
* Slick design

### Requirements ###
* Web Server with PHP 5.6+ and the `pdo_mysql` and `gettext` modules installed
* Web Server with PHP 5.6+ and the `pdo_mysql`, `gettext` and `xml` extensions installed
* Web Browser supporting HTML5, CSS3 and JavaScript
* Any of the following:
* [Denora Stats](http://www.denorastats.org) v1.5 server with MySQL enabled
Expand Down
3 changes: 2 additions & 1 deletion admin/index.php
Expand Up @@ -18,7 +18,8 @@
if (version_compare(PHP_VERSION, '5.6.0', '<')
|| !extension_loaded('pdo')
|| !in_array('mysql', PDO::getAvailableDrivers())
|| !extension_loaded('gettext'))
|| !extension_loaded('gettext')
|| !extension_loaded('xml'))
die('ERROR: System requirements not met. Please run Setup.');
if (!file_exists('../conf/magirc.cfg.php'))
die('ERROR: MagIRC is not configured. Please run Setup.');
Expand Down
3 changes: 2 additions & 1 deletion index.php
Expand Up @@ -18,7 +18,8 @@
if (version_compare(PHP_VERSION, '5.6.0', '<')
|| !extension_loaded('pdo')
|| !in_array('mysql', PDO::getAvailableDrivers())
|| !extension_loaded('gettext'))
|| !extension_loaded('gettext')
|| !extension_loaded('xml'))
die('ERROR: System requirements not met. Please run Setup.');
if (!file_exists('conf/magirc.cfg.php')) die('ERROR: MagIRC is not configured. Please run Setup.');
if (!is_writable('tmp/')) die('ERROR: Unable to write temporary files. Please run Setup.');
Expand Down
7 changes: 7 additions & 0 deletions setup/lib/Setup.class.php
Expand Up @@ -68,6 +68,13 @@ function requirementsCheck() {
$status['error'] = true;
}

if (extension_loaded('xml') == 1) {
$status['xml'] = true;
} else {
$status['xml'] = false;
$status['error'] = true;
}

if (file_exists(MAGIRC_CFG_FILE)) {
if (is_writable(MAGIRC_CFG_FILE)) {
$status['writable'] = true;
Expand Down
4 changes: 4 additions & 0 deletions setup/tpl/step1.twig
Expand Up @@ -15,6 +15,10 @@
{% else %} <span style="color:red">Missing!</span><br />This component is required to run MagIRC. Please contact your Administrator.{% endif %}
</pre>

<pre>Checking PHP XML extension... {% if status.xml %}<span style="color:green">Present</span>
{% else %} <span style="color:red">Missing!</span><br />This component is required to run MagIRC. Please contact your Administrator.{% endif %}
</pre>

<pre>Checking SQL configuration files...{% if status.writable %} <span style="color:green;">Writable</span>
{% else %} <span style="color:orange;">Not writable</span>
<br />Please copy the conf/*.cfg.dist.php files to conf/*.cfg.php<br />and chmod them to 0666.
Expand Down

0 comments on commit e3122a9

Please sign in to comment.