From 444f14063920692163ee321a872debfc48feaada Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sun, 25 Jan 2015 17:43:58 +0100 Subject: wow. Many changes to installation script. Much easier. --- install/wallabag_compatibility_test.php | 394 +------------------------------- 1 file changed, 11 insertions(+), 383 deletions(-) (limited to 'install/wallabag_compatibility_test.php') 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 -- cgit v1.2.3 From ca056e7fd1e2bcc8390aabdc6b4fcb84aeb0d302 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 27 Jan 2015 00:41:25 +0100 Subject: changes for 1026 for PDO exceptions --- install/wallabag_compatibility_test.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'install/wallabag_compatibility_test.php') diff --git a/install/wallabag_compatibility_test.php b/install/wallabag_compatibility_test.php index 8a0656cf..1093b2a3 100644 --- a/install/wallabag_compatibility_test.php +++ b/install/wallabag_compatibility_test.php @@ -52,4 +52,36 @@ function isPassing() { return !in_array(false, $status); } +/* Function taken from at http://php.net/manual/en/function.rmdir.php#110489 + * Idea : nbari at dalmp dot com + * Rights unknown + * Here in case of .gitignore files + */ + +function delTree($dir) { + $files = array_diff(scandir($dir), array('.','..')); + foreach ($files as $file) { + (is_dir("$dir/$file")) ? delTree("$dir/$file") : unlink("$dir/$file"); + } + return rmdir($dir); + } + +function generate_salt() { + mt_srand(microtime(true)*100000 + memory_get_usage(true)); + return md5(uniqid(mt_rand(), true)); +} + +function executeQuery($handle, $sql, $params) { + try + { + $query = $handle->prepare($sql); + $query->execute($params); + return $query->fetchAll(); + } + catch (Exception $e) + { + return FALSE; + } +} + ?> \ No newline at end of file -- cgit v1.2.3 From 22f19b23a6e9400b5776a9a7f0eedb9eb1b5362e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 31 Jan 2015 23:35:45 +0100 Subject: view improvements & check if at least one pdo driver is available --- install/wallabag_compatibility_test.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'install/wallabag_compatibility_test.php') diff --git a/install/wallabag_compatibility_test.php b/install/wallabag_compatibility_test.php index 1093b2a3..3b465851 100644 --- a/install/wallabag_compatibility_test.php +++ b/install/wallabag_compatibility_test.php @@ -26,6 +26,7 @@ $allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); $filter_ok = extension_loaded('filter'); $gettext_ok = function_exists("gettext"); $gd_ok = extension_loaded('gd'); +$pdo_drivers_passing = extension_loaded('pdo_sqlite') || extension_loaded('pdo_mysql') || extension_loaded('pdo_pgsql'); if (extension_loaded('xmlreader')) { $xml_ok = true; @@ -38,7 +39,7 @@ if (extension_loaded('xmlreader')) { $xml_ok = false; } -$status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok, 'xml' => $xml_ok, 'pcre' => $pcre_ok, 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok, 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok, 'gettext' => $gettext_ok, 'gd' => $gd_ok); +$status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok, 'pdo_drivers_passing' => $pdo_drivers_passing, 'xml' => $xml_ok, 'pcre' => $pcre_ok, 'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok, 'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok, 'gettext' => $gettext_ok, 'gd' => $gd_ok); return $status; } -- cgit v1.2.3