From 444f14063920692163ee321a872debfc48feaada Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 25 Jan 2015 17:43:58 +0100 Subject: [PATCH] wow. Many changes to installation script. Much easier. --- install/index.php | 291 ++++++++++++++++- install/wallabag_compatibility_test.php | 394 +----------------------- 2 files changed, 297 insertions(+), 388 deletions(-) diff --git a/install/index.php b/install/index.php index ec504160..dbfe9539 100755 --- a/install/index.php +++ b/install/index.php @@ -11,6 +11,8 @@ $errors = array(); $successes = array(); +require_once('wallabag_compatibility_test.php'); + /* Function taken from at http://php.net/manual/en/function.rmdir.php#110489 * Idea : nbari at dalmp dot com * Rights unknown @@ -210,6 +212,117 @@ else if (isset($_POST['install'])) { + + + +
@@ -259,11 +372,8 @@ else if (isset($_POST['install'])) {

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

If you need help, you can read the doc: offline documentation and online one (already up-to-date).

-

Don't forget to check your server compatibility here.

-
-
- Technical settings - + +
wallabag needs twig, a template engine (?). Two ways to install it:
  • automatically download and extract vendor.zip into your wallabag folder. @@ -277,6 +387,159 @@ php composer.phar install
+ +

Server compatibility test (click to view details) : + All good + + Some problems, but it's OK ! + + Bad news : you can't run wallabag +

+ + +
+
+

: Compatibility Test

+ + + + + + + + + + + + + + + + + + + + Enabled' : ' + + + + + + Enabled, and sane' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + + + + Enabled' : ' + + + +
TestShould BeWhat You HaveWhat it means
PHP5.3.3 or higherPHP: You are running a supported version of PHP.' : 'PHP: You are running an unsupported version of PHP. ' . $status['app_name'] . ' will not work here.' ;?>
PDOEnabledDisabled'; ?>PDO: You have PDO support enabled.' : 'PDO: Your PHP installation doesn\'t support PHP PDO. ' . $status['app_name'] . ' will not work here.' ?>
XMLEnabledDisabled, or broken'; ?>XML: You have XMLReader support or a version of XML support that isn\'t broken installed.' : 'XML: Your PHP installation doesn\'t support XML parsing. ' . $status['app_name'] . ' will not work here.' ?>
PCREEnabledDisabled'; ?>PCRE: You have PCRE support installed.' : 'PCRE: Your PHP installation doesn\'t support Perl-Compatible Regular Expressions. ' . $status['app_name'] .' will not work here.' ?>
ZlibEnabledDisabled'; ?>Zlib: You have Zlib enabled. This allows SimplePie to support GZIP-encoded pages.' : 'Zlib: The Zlib extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle pages as uncompressed text.' ?>
mbstringEnabledDisabled'; ?>mbstring and iconv: You have both mbstring and iconv installed! This will allow to handle the greatest number of languages. + mbstring: mbstring is installed, but iconv is not. + iconv: iconv is installed, but mbstring is not. + mbstring and iconv: You do not have either of the extensions installed. This will significantly impair your ability to read non-English pages, as well as even some English ones. + +
iconvEnabledDisabled'; ?>
DOM / XML extensionEnabledDisabled'; ?>DOM/XML: You can parse ini files.' : 'DOM/XML: Your PHP configuration isn\'t standard, you\'re missing PHP-DOM. You may try to install a package or recompile PHP. ' . $status['app_name'] . ' will not work here.'; ?>
Data filteringEnabledDisabled'; ?>Data filtering: You can use the PHP build-in DOM to operate on XML documents.' : 'Data filtering: Your PHP configuration has the filter extension disabled. ' . $status['app_name'] . ' will not work here.' ?>
GDEnabledDisabled'; ?>GD: You have GD support installed.' : 'GD: The GD extension is not available. ' . $status['app_name'] . ' will not be able to download pictures locally on your server.' ?>
TidyEnabledDisabled'; ?>Tidy: You have Tidy support installed.' : 'Tidy: The Tidy extension is not available.' . $status['app_name'] . ' should still work with most pages, but you may experience problems with some. You can install it with sudo apt-get install php5-tidy and then reload Apache sudo service apache2 reload.' ; ?>
cURLEnabledDisabled'; ?>cURL: You have cURL support installed.' : 'cURL: The cURL extension is not available. SimplePie will use fsockopen() instead.' ?>
Parse ini fileEnabledDisabled'; ?>Parse ini: You can parse ini files.' : 'Parse ini files function : Bad luck : your webhost has decided to block the use of the parse_ini_file function. ' . $status['app_name'] . ' will not work here.' ?>
Parallel URL fetchingEnabledDisabled'; ?>Parallel URL fetching: You have HttpRequestPool or curl_multi support installed.' : 'Parallel URL fetching: HttpRequestPool or curl_multi support is not available. ' . $status['app_name'] . ' will use file_get_contents() instead to fetch URLs sequentially rather than in parallel.' ?>
allow_url_fopenEnabledDisabled'; ?>allow_url_fopen: You have allow_url_fopen enabled.' : 'allow_url_fopen: Your PHP configuration has allow_url_fopen disabled. ' . $status['app_name'] . ' will not work here.' ?>
gettextEnabledDisabled'; ?>Gettext: You have gettext enabled.' : 'GetText: The gettext extension is not available. The system we use to display wallabag in various languages is not available. ' . $status['app_name'] .' will not work here.' ?>
+
+ +
+ + +

Bottom Line: Yes, you can run !

+

Your webhost has its act together!

+

Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

+ + +

Bottom Line: Yes, you can run !

+

For most pages, it'll run with no problems. There are certain languages that you might have a hard time with though.

+

Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

+ +

Bottom Line: We're sorry…

+

Your webhost does not support the minimum requirements for . It may be a good idea to contact your webhost and point them to the results of this test. They may be able to enable/install the required components.

+ +
+ +
+

This compatibility test has been borrowed (and slightly adapted by fivefilters.org) from the one supplied by SimplePie.org.

+
+ +
+ + +
+ Technical settings

Database engine:

    @@ -331,6 +594,19 @@ php composer.phar install $("#mysql_infos").hide(); $("#pg_infos").hide(); + $(".details").hide(); + + + $('.technical').hide(); + + $('.technical').show(); + + $("#install_button").hide(); @@ -370,6 +646,11 @@ php composer.phar install } } }); + + $(".detail").click(function() + { + $('.details').toggle(); + }); diff --git a/install/wallabag_compatibility_test.php b/install/wallabag_compatibility_test.php index 61a8e99f..8a0656cf 100644 --- a/install/wallabag_compatibility_test.php +++ b/install/wallabag_compatibility_test.php @@ -8,9 +8,11 @@ * @license http://opensource.org/licenses/MIT see COPYING file */ +function status() { $app_name = 'wallabag'; $php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>=')); +$pdo_ok = class_exists('PDO'); $pcre_ok = extension_loaded('pcre'); $zlib_ok = extension_loaded('zlib'); $mbstring_ok = extension_loaded('mbstring'); @@ -25,7 +27,6 @@ $filter_ok = extension_loaded('filter'); $gettext_ok = function_exists("gettext"); $gd_ok = extension_loaded('gd'); - if (extension_loaded('xmlreader')) { $xml_ok = true; } elseif (extension_loaded('xml')) { @@ -37,391 +38,18 @@ if (extension_loaded('xmlreader')) { $xml_ok = false; } -header('Content-type: text/html; charset=UTF-8'); - -?> - - - -<?php echo $app_name; ?>: Server Compatibility Test - - - - - - - -
    -
    - -
    -

    : Compatibility Test

    - - - - - - - - - - - - - - - - - - Enabled, and sane' : ' - - - - - Enabled' : ' - - - - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - - - - Enabled' : ' - - -
    TestShould BeWhat You Have
    PHP5.3.3 or higher
    XMLEnabledDisabled, or broken'; ?>
    PCREEnabledDisabled'; ?>
    DOM / XML extensionEnabledDisabled'; ?>
    Data filteringEnabledDisabled'; ?>
    GDEnabledDisabled'; ?>
    TidyEnabledDisabled'; ?>
    cURLEnabledDisabled'; ?>
    Parse ini fileEnabledDisabled'; ?>
    Parallel URL fetchingEnabledDisabled'; ?>
    allow_url_fopenEnabledDisabled'; ?>
    gettextEnabledDisabled'; ?>
    -
    - -
    -

    What does this mean?

    -
      - - -
    1. You have everything you need to run properly! Congratulations!
    2. - - -
    3. PHP: You are running a supported version of PHP. No problems here.
    4. - -
    5. XML: You have XMLReader support or a version of XML support that isn't broken installed. No problems here.
    6. - -
    7. PCRE: You have PCRE support installed. No problems here.
    8. - - -
    9. allow_url_fopen: You have allow_url_fopen enabled. No problems here.
    10. - - -
    11. Gettext: You have gettext enabled. No problems here.
    12. - - -
    13. Parse ini: You can parse ini files. No problems here.
    14. - - -
    15. DOM/XML: You can parse ini files. No problems here.
    16. - - -
    17. Data filtering: You can use the PHP build-in DOM to operate on XML documents. No problems here.
    18. - - -
    19. Zlib: You have Zlib enabled. This allows SimplePie to support GZIP-encoded feeds. No problems here.
    20. - -
    21. Zlib: The Zlib extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.
    22. - - - -
    23. mbstring and iconv: You have both mbstring and iconv installed! This will allow to handle the greatest number of languages. No problems here.
    24. - -
    25. mbstring: mbstring is installed, but iconv is not.
    26. - -
    27. iconv: iconv is installed, but mbstring is not.
    28. - -
    29. mbstring and iconv: You do not have either of the extensions installed. This will significantly impair your ability to read non-English feeds, as well as even some English ones.
    30. - - - -
    31. GD: You have GD support installed. No problems here.
    32. - -
    33. GD: The GD extension is not available. will not be able to download pictures locally on your server.
    34. - - - -
    35. Tidy: You have Tidy support installed. No problems here.
    36. - -
    37. Tidy: The Tidy extension is not available. should still work with most feeds, but you may experience problems with some. You can install it with sudo apt-get install php5-tidy and then reload Apache sudo service apache2 reload.
    38. - - - -
    39. cURL: You have cURL support installed. No problems here.
    40. - -
    41. cURL: The cURL extension is not available. SimplePie will use fsockopen() instead.
    42. - - - -
    43. Parallel URL fetching: You have HttpRequestPool or curl_multi support installed. No problems here.
    44. - -
    45. Parallel URL fetching: HttpRequestPool or curl_multi support is not available. will use file_get_contents() instead to fetch URLs sequentially rather than in parallel.
    46. - - - -
    47. Data filtering: Your PHP configuration has the filter extension disabled. will not work here.
    48. - - - -
    49. DOM/XML: Your PHP configuration isn't standard, you're missing PHP-DOM. You may try to install a package or recompile PHP. will not work here.
    50. - - - -
    51. Parse ini files function : Bad luck : your webhost has decided to block the use of the parse_ini_file function. will not work here. - - - -
    52. GetText: The gettext extension is not available. The system we use to display wallabag in various languages is not available. will not work here.
    53. - - - -
    54. allow_url_fopen: Your PHP configuration has allow_url_fopen disabled. will not work here.
    55. - - - -
    56. PCRE: Your PHP installation doesn't support Perl-Compatible Regular Expressions. will not work here.
    57. - - -
    58. XML: Your PHP installation doesn't support XML parsing. will not work here.
    59. - - -
    60. PHP: You are running an unsupported version of PHP. will not work here.
    61. - - -
    -
    - -
    - - -

    Bottom Line: Yes, you can!

    -

    Your webhost has its act together!

    - -

    You can download the latest version of from wallabag.org.

    -

    If you already have done that, you should access the index.php file of your installation to configure and/or start using wallabag

    - -

    You can now return to the installation section.

    - -

    Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

    - - -

    Bottom Line: Yes, you can!

    -

    For most feeds, it'll run with no problems. There are certain languages that you might have a hard time with though.

    - -

    You can download the latest version of from wallabag.org.

    -

    If you already have done that, you should access the index.php file of your installation to configure and/or start using wallabag

    - -

    You can now return to the installation section.

    - -

    Note: Passing this test does not guarantee that will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.

    - -

    Bottom Line: We're sorry…

    -

    Your webhost does not support the minimum requirements for . It may be a good idea to contact your webhost and point them to the results of this test. They may be able to enable/install the required components.

    - -
    - -
    -

    This compatibility test has been borrowed (and slightly adapted by fivefilters.org) from the one supplied by SimplePie.org.

    -
    - -
    - -
    - - +?> \ No newline at end of file -- 2.41.0