diff --git a/install/index.php b/install/index.php
index 1ae782a..076cb8d 100755
--- a/install/index.php
+++ b/install/index.php
@@ -11,6 +11,39 @@
$errors = array();
$successes = array();
+
+/**
+ * First step : check php configuration
+ */
+
+$app_name = 'wallabag';
+$phpconfig = [];
+
+$phpconfig['php'] = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>='));
+$phpconfig['pcre'] = extension_loaded('pcre');
+$phpconfig['zlib'] = extension_loaded('zlib');
+$phpconfig['mbstring'] = extension_loaded('mbstring');
+$phpconfig['iconv'] = extension_loaded('iconv');
+$phpconfig['tidy'] = function_exists('tidy_parse_string');
+$phpconfig['curl'] = function_exists('curl_exec');
+$phpconfig['parse_ini'] = function_exists('parse_ini_file');
+$phpconfig['parallel'] = ((extension_loaded('http') && class_exists('HttpRequestPool')) || ($phpconfig['curl'] && function_exists('curl_multi_init')));
+$phpconfig['allow_url_fopen'] = (bool)ini_get('allow_url_fopen');
+$phpconfig['filter'] = extension_loaded('filter');
+$phpconfig['gettext'] = function_exists("gettext");
+
+if (extension_loaded('xmlreader')) {
+ $xml_ok = true;
+} elseif (extension_loaded('xml')) {
+ $parser_check = xml_parser_create();
+ xml_parse_into_struct($parser_check, '
To install wallabag, you just have to fill the following fields. That's all.
-Don't forget to check your server compatibility here.
+ +Test | +Should Be | +What You Have | +
---|---|---|
PHP | +5.3.3 or higher | ++ |
XML | +Enabled | + Enabled, and sane' : 'Disabled, or broken Your PHP installation doesn\'t support XML parsing.'; ?> |
+
PCRE | +Enabled | + Enabled' : 'Disabled Your PHP installation doesn\'t support Perl-Compatible Regular Expressions.'; ?> |
+
Data filtering | +Enabled | + Enabled' : 'Disabled Your PHP configuration has the filter extension disabled. '; ?> |
+
Tidy | +Enabled | + Enabled' : 'Disabled Extension not available. ' . $app_name . ' should still work with most feeds, but you may experience problems with some.'; ?> |
+
cURL | +Enabled | + Enabled' : 'Disabled Extension is not available. SimplePie will use fsockopen() instead.'; ?> |
+
Parse ini file | +Enabled | + Enabled' : 'Disabled Bad luck : your webhost has decided to block the use of the parse_ini_file function.'; ?> |
+
Parallel URL fetching | +Enabled | + Enabled' : 'DisabledHttpRequestPool or curl_multi support is not available. will use file_get_contents() instead to fetch URLs sequentially rather than in parallel.'; ?> |
+
allow_url_fopen | +Enabled | + Enabled' : 'Disabled Your PHP configuration has allow_url_fopen disabled.'; ?> |
+
gettext | +Enabled | + Enabled' : 'Disabled Extension not available. The system we use to display wallabag in various languages is not available.'; ?> |
+
Status : + Next Step
'; + } else { + echo 'Your webserver hasn\'t got the perfect configuration for ' . $app_name . ' to work properly, but it should work anyway.