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, '&', $values); + xml_parser_free($parser_check); + $xml_ok = isset($values[0]['value']); +} else { + $xml_ok = false; +} +$phpconfig['xml'] = $xml_ok; + /* Function taken from at http://php.net/manual/en/function.rmdir.php#110489 * Idea : nbari at dalmp dot com * Rights unknown @@ -187,6 +220,34 @@ else if (isset($_POST['install'])) { +
@@ -234,13 +295,105 @@ else if (isset($_POST['install'])) { -

To install wallabag, you just have to fill the following fields. That's all.

-

Don't forget to check your server compatibility here.

+ +
+

: Compatibility Test

+ + + + + + + + + + + + + + + + + + Enabled, and sane' : ' + + + + + Enabled' : ' + + + + + + + + Enabled' : ' + + + + + Enabled' : ' + + + + + Enabled' : ' + + + + + Enabled' : ' + + + + + Enabled' : ' + + + + + Enabled' : ' + + + + + Enabled' : ' + + +
TestShould BeWhat You Have
PHP5.3.3 or higher
XMLEnabledDisabled, or broken
Your PHP installation doesn\'t support XML parsing.'; ?>
PCREEnabledDisabled
Your PHP installation doesn\'t support Perl-Compatible Regular Expressions.'; ?>
Data filteringEnabledDisabled
Your PHP configuration has the filter extension disabled. '; ?>
TidyEnabledDisabled
Extension not available. ' . $app_name . ' should still work with most feeds, but you may experience problems with some.'; ?>
cURLEnabledDisabled
Extension is not available. SimplePie will use fsockopen() instead.'; ?>
Parse ini fileEnabledDisabled
Bad luck : your webhost has decided to block the use of the parse_ini_file function.'; ?>
Parallel URL fetchingEnabledDisabled
HttpRequestPool or curl_multi support is not available. will use file_get_contents() instead to fetch URLs sequentially rather than in parallel.'; ?>
allow_url_fopenEnabledDisabled
Your PHP configuration has allow_url_fopen disabled.'; ?>
gettextEnabledDisabled
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.
You can try to fix some problems highlighted above.
Next Step

'; + } + } else { + echo $app_name . ' can\'t work on this webserver. Please fix the problems highlighted above.'; + } + + ?> +

+
+
+

Twig installation

- Technical settings - -
wallabag needs twig, a template engine (?). Two ways to install it:
+ +
wallabag needs twig, a template engine (?). Two ways to install it:
  • automatically download and extract vendor.zip into your wallabag folder.

    @@ -252,7 +405,15 @@ else if (isset($_POST['install'])) { php composer.phar install
- + +
Twig is already installed. All good !
+ +
+ Next Step +
+
+

Database installation

+

Database engine:

    @@ -282,9 +443,22 @@ php composer.phar install

- +
You must choose a database system. +
    +
  • SQLite is the simplest of those three database systems. It just writes data into a file. You don't have to configure login informations of any kind.
    + The downfall is that it might be slower than other database systems with very large piece of data.
    + It is therefore recommanded if you begin with wallabag, or you don't want to deal with extra configuration.
  • +
  • MySQL (also known as MariaDB) is a very common database system on most servers.
    + It should be faster than SQLite in most cases.
    + You have to enter credentials to access it. Contact your server administrator if needed.
  • +
  • PostgreSQL is another database system very similar to MySQL, but less frequent on most hosting plans. However, some people prefer it since it may be faster than MySQL in some cases.
  • +
+
+ +
+
+

User settings

- User settings