mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-23 17:42:15 -05:00
Improvements for compatibility_test file
- gettext detection (not default on WAMP) ; part fix of #579 - added colors to make viewing what's wrong better and quicker (green/orange/red) - added a link to index.php if it's good
This commit is contained in:
parent
ad03eb6286
commit
d607330557
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$app_name = 'wallabag 1';
|
||||
$app_name = 'wallabag';
|
||||
|
||||
$php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>='));
|
||||
$pcre_ok = extension_loaded('pcre');
|
||||
@ -11,6 +11,7 @@ $curl_ok = function_exists('curl_exec');
|
||||
$parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) || ($curl_ok && function_exists('curl_multi_init')));
|
||||
$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
|
||||
$filter_ok = extension_loaded('filter');
|
||||
$gettext_ok = function_exists("gettext");
|
||||
|
||||
if (extension_loaded('xmlreader')) {
|
||||
$xml_ok = true;
|
||||
@ -130,8 +131,6 @@ table#chart tr.enabled td {
|
||||
|
||||
table#chart tr.disabled td,
|
||||
table#chart tr.disabled td a {
|
||||
color:#999;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
table#chart tr.disabled td a {
|
||||
@ -154,6 +153,19 @@ div.chunk {
|
||||
background-color:transparent;
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
.good{
|
||||
background-color:#52CC5B;
|
||||
}
|
||||
.bad{
|
||||
background-color:#F74343;
|
||||
font-style:italic;
|
||||
font-weight: bold;
|
||||
}
|
||||
.pass{
|
||||
background-color:#FF9500;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@ -177,57 +189,62 @@ div.chunk {
|
||||
<tr class="<?php echo ($php_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td>PHP</td>
|
||||
<td>5.3.3 or higher</td>
|
||||
<td><?php echo phpversion(); ?></td>
|
||||
<td class="<?php echo ($php_ok) ? 'good' : 'disabled'; ?>"><?php echo phpversion(); ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($xml_ok) ? 'enabled, and sane' : 'disabled, or broken'; ?>">
|
||||
<tr class="<?php echo ($xml_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/xml">XML</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($xml_ok) ? 'Enabled, and sane' : 'Disabled, or broken'; ?></td>
|
||||
<?php echo ($xml_ok) ? '<td class="good">Enabled, and sane</span>' : '<td class="bad">Disabled, or broken'; ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($pcre_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/pcre">PCRE</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($pcre_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($pcre_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
|
||||
</tr>
|
||||
<!-- <tr class="<?php echo ($zlib_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/zlib">Zlib</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($zlib_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($zlib_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
|
||||
</tr> -->
|
||||
<!-- <tr class="<?php echo ($mbstring_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/mbstring">mbstring</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($mbstring_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($mbstring_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
|
||||
</tr> -->
|
||||
<!-- <tr class="<?php echo ($iconv_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/iconv">iconv</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($iconv_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($iconv_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
|
||||
</tr> -->
|
||||
<tr class="<?php echo ($filter_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($filter_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/tidy">Tidy</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($tidy_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($tidy_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($curl_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/curl">cURL</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo (extension_loaded('curl')) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo (extension_loaded('curl')) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($parallel_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td>Parallel URL fetching</td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($parallel_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($parallel_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($allow_url_fopen_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen">allow_url_fopen</a></td>
|
||||
<td>Enabled</td>
|
||||
<td><?php echo ($allow_url_fopen_ok) ? 'Enabled' : 'Disabled'; ?></td>
|
||||
<?php echo ($allow_url_fopen_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo ($gettext_ok) ? 'enabled' : 'disabled'; ?>">
|
||||
<td><a href="http://php.net/manual/en/book.gettext.php">gettext</a></td>
|
||||
<td>Enabled</td>
|
||||
<?php echo ($gettext_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -237,7 +254,7 @@ div.chunk {
|
||||
<h3>What does this mean?</h3>
|
||||
<ol>
|
||||
<?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $zlib_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?>
|
||||
<?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?>
|
||||
<?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok && $gettext_ok): ?>
|
||||
<li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li>
|
||||
<?php else: ?>
|
||||
<?php if ($php_ok): ?>
|
||||
@ -250,6 +267,9 @@ div.chunk {
|
||||
<?php if ($allow_url_fopen_ok): ?>
|
||||
<li><strong>allow_url_fopen:</strong> You have allow_url_fopen enabled. <em>No problems here.</em></li>
|
||||
|
||||
<?php if ($gettext_ok): ?>
|
||||
<li><strong>Gettext:</strong> You have <code>gettext</code> enabled. <em>No problems here.</em></li>
|
||||
|
||||
<?php if ($filter_ok): ?>
|
||||
<li><strong>Data filtering:</strong> You have the PHP filter extension enabled. <em>No problems here.</em></li>
|
||||
|
||||
@ -288,21 +308,25 @@ div.chunk {
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<li><strong>Data filtering:</strong> Your PHP configuration has the filter extension disabled. <em><?php echo $app_name; ?> will not work here.</em></li>
|
||||
<li><strong>Data filtering:</strong> Your PHP configuration has the filter extension disabled. <strong><?php echo $app_name; ?> will not work here.</strong></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<li><strong>allow_url_fopen:</strong> Your PHP configuration has allow_url_fopen disabled. <em><?php echo $app_name; ?> will not work here.</em></li>
|
||||
<li><strong>GetText:</strong> The <code>gettext</code> extension is not available. The system we use to display wallabag in various languages is not available. <strong><?php echo $app_name; ?> will not work here.</strong></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<li><strong>PCRE:</strong> Your PHP installation doesn't support Perl-Compatible Regular Expressions. <em><?php echo $app_name; ?> will not work here.</em></li>
|
||||
<li><strong>allow_url_fopen:</strong> Your PHP configuration has allow_url_fopen disabled. <strong><?php echo $app_name; ?> will not work here.</strong></li>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php else: ?>
|
||||
<li><strong>PCRE:</strong> Your PHP installation doesn't support Perl-Compatible Regular Expressions. <strong><?php echo $app_name; ?> will not work here.</strong></li>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<li><strong>XML:</strong> Your PHP installation doesn't support XML parsing. <em><?php echo $app_name; ?> will not work here.</em></li>
|
||||
<li><strong>XML:</strong> Your PHP installation doesn't support XML parsing. <strong><?php echo $app_name; ?> will not work here.</strong></li>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<li><strong>PHP:</strong> You are running an unsupported version of PHP. <em><?php echo $app_name; ?> will not work here.</em></li>
|
||||
<li><strong>PHP:</strong> You are running an unsupported version of PHP. <strong><?php echo $app_name; ?> will not work here.</strong></li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</ol>
|
||||
@ -310,16 +334,18 @@ div.chunk {
|
||||
|
||||
<div class="chunk">
|
||||
<?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $allow_url_fopen_ok) { ?>
|
||||
<?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok) { ?>
|
||||
<?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok && $gettext_ok) { ?>
|
||||
<h3>Bottom Line: Yes, you can!</h3>
|
||||
<p><em>Your webhost has its act together!</em></p>
|
||||
<p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p>
|
||||
<p>If you already have done that, you should access <a href="index.php">the index.php file</a> of your installation to configure and start using wallabag</p>
|
||||
<p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p>
|
||||
<?php //} else if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $allow_url_fopen_ok && $filter_ok) { ?>
|
||||
<?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok) { ?>
|
||||
<?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok && $gettext_ok) { ?>
|
||||
<h3>Bottom Line: Yes, you can!</h3>
|
||||
<p><em>For most feeds, it'll run with no problems.</em> There are certain languages that you might have a hard time with though.</p>
|
||||
<p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p>
|
||||
<p>If you already have done that, you should access <a href="index.php">the index.php file</a> of your installation to configure and start using wallabag</p>
|
||||
<p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost — it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p>
|
||||
<?php } else { ?>
|
||||
<h3>Bottom Line: We're sorry…</h3>
|
||||
|
Loading…
Reference in New Issue
Block a user