aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--wallabag_compatibility_test.php138
1 files changed, 82 insertions, 56 deletions
diff --git a/wallabag_compatibility_test.php b/wallabag_compatibility_test.php
index 26dce018..51ea31e1 100644
--- a/wallabag_compatibility_test.php
+++ b/wallabag_compatibility_test.php
@@ -1,5 +1,5 @@
1<?php 1<?php
2$app_name = 'wallabag 1'; 2$app_name = 'wallabag';
3 3
4$php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>=')); 4$php_ok = (function_exists('version_compare') && version_compare(phpversion(), '5.3.3', '>='));
5$pcre_ok = extension_loaded('pcre'); 5$pcre_ok = extension_loaded('pcre');
@@ -11,6 +11,7 @@ $curl_ok = function_exists('curl_exec');
11$parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) || ($curl_ok && function_exists('curl_multi_init'))); 11$parallel_ok = ((extension_loaded('http') && class_exists('HttpRequestPool')) || ($curl_ok && function_exists('curl_multi_init')));
12$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen'); 12$allow_url_fopen_ok = (bool)ini_get('allow_url_fopen');
13$filter_ok = extension_loaded('filter'); 13$filter_ok = extension_loaded('filter');
14$gettext_ok = function_exists("gettext");
14 15
15if (extension_loaded('xmlreader')) { 16if (extension_loaded('xmlreader')) {
16 $xml_ok = true; 17 $xml_ok = true;
@@ -130,8 +131,6 @@ table#chart tr.enabled td {
130 131
131table#chart tr.disabled td, 132table#chart tr.disabled td,
132table#chart tr.disabled td a { 133table#chart tr.disabled td a {
133 color:#999;
134 font-style:italic;
135} 134}
136 135
137table#chart tr.disabled td a { 136table#chart tr.disabled td a {
@@ -154,6 +153,19 @@ div.chunk {
154 background-color:transparent; 153 background-color:transparent;
155 font-style:italic; 154 font-style:italic;
156} 155}
156
157.good{
158background-color:#52CC5B;
159}
160.bad{
161background-color:#F74343;
162font-style:italic;
163font-weight: bold;
164}
165.pass{
166background-color:#FF9500;
167}
168
157</style> 169</style>
158 170
159</head> 171</head>
@@ -177,58 +189,63 @@ div.chunk {
177 <tr class="<?php echo ($php_ok) ? 'enabled' : 'disabled'; ?>"> 189 <tr class="<?php echo ($php_ok) ? 'enabled' : 'disabled'; ?>">
178 <td>PHP</td> 190 <td>PHP</td>
179 <td>5.3.3 or higher</td> 191 <td>5.3.3 or higher</td>
180 <td><?php echo phpversion(); ?></td> 192 <td class="<?php echo ($php_ok) ? 'good' : 'disabled'; ?>"><?php echo phpversion(); ?></td>
181 </tr> 193 </tr>
182 <tr class="<?php echo ($xml_ok) ? 'enabled, and sane' : 'disabled, or broken'; ?>"> 194 <tr class="<?php echo ($xml_ok) ? 'enabled' : 'disabled'; ?>">
183 <td><a href="http://php.net/xml">XML</a></td> 195 <td><a href="http://php.net/xml">XML</a></td>
184 <td>Enabled</td> 196 <td>Enabled</td>
185 <td><?php echo ($xml_ok) ? 'Enabled, and sane' : 'Disabled, or broken'; ?></td> 197 <?php echo ($xml_ok) ? '<td class="good">Enabled, and sane</span>' : '<td class="bad">Disabled, or broken'; ?></td>
186 </tr> 198 </tr>
187 <tr class="<?php echo ($pcre_ok) ? 'enabled' : 'disabled'; ?>"> 199 <tr class="<?php echo ($pcre_ok) ? 'enabled' : 'disabled'; ?>">
188 <td><a href="http://php.net/pcre">PCRE</a></td> 200 <td><a href="http://php.net/pcre">PCRE</a></td>
189 <td>Enabled</td> 201 <td>Enabled</td>
190 <td><?php echo ($pcre_ok) ? 'Enabled' : 'Disabled'; ?></td> 202 <?php echo ($pcre_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
191 </tr> 203 </tr>
192<!-- <tr class="<?php echo ($zlib_ok) ? 'enabled' : 'disabled'; ?>"> 204<!-- <tr class="<?php echo ($zlib_ok) ? 'enabled' : 'disabled'; ?>">
193 <td><a href="http://php.net/zlib">Zlib</a></td> 205 <td><a href="http://php.net/zlib">Zlib</a></td>
194 <td>Enabled</td> 206 <td>Enabled</td>
195 <td><?php echo ($zlib_ok) ? 'Enabled' : 'Disabled'; ?></td> 207 <?php echo ($zlib_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
196 </tr> --> 208 </tr> -->
197<!-- <tr class="<?php echo ($mbstring_ok) ? 'enabled' : 'disabled'; ?>"> 209<!-- <tr class="<?php echo ($mbstring_ok) ? 'enabled' : 'disabled'; ?>">
198 <td><a href="http://php.net/mbstring">mbstring</a></td> 210 <td><a href="http://php.net/mbstring">mbstring</a></td>
199 <td>Enabled</td> 211 <td>Enabled</td>
200 <td><?php echo ($mbstring_ok) ? 'Enabled' : 'Disabled'; ?></td> 212 <?php echo ($mbstring_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
201 </tr> --> 213 </tr> -->
202<!-- <tr class="<?php echo ($iconv_ok) ? 'enabled' : 'disabled'; ?>"> 214<!-- <tr class="<?php echo ($iconv_ok) ? 'enabled' : 'disabled'; ?>">
203 <td><a href="http://php.net/iconv">iconv</a></td> 215 <td><a href="http://php.net/iconv">iconv</a></td>
204 <td>Enabled</td> 216 <td>Enabled</td>
205 <td><?php echo ($iconv_ok) ? 'Enabled' : 'Disabled'; ?></td> 217 <?php echo ($iconv_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
206 </tr> --> 218 </tr> -->
207 <tr class="<?php echo ($filter_ok) ? 'enabled' : 'disabled'; ?>"> 219 <tr class="<?php echo ($filter_ok) ? 'enabled' : 'disabled'; ?>">
208 <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td> 220 <td><a href="http://uk.php.net/manual/en/book.filter.php">Data filtering</a></td>
209 <td>Enabled</td> 221 <td>Enabled</td>
210 <td><?php echo ($filter_ok) ? 'Enabled' : 'Disabled'; ?></td> 222 <?php echo ($filter_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
211 </tr> 223 </tr>
212 <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>"> 224 <tr class="<?php echo ($tidy_ok) ? 'enabled' : 'disabled'; ?>">
213 <td><a href="http://php.net/tidy">Tidy</a></td> 225 <td><a href="http://php.net/tidy">Tidy</a></td>
214 <td>Enabled</td> 226 <td>Enabled</td>
215 <td><?php echo ($tidy_ok) ? 'Enabled' : 'Disabled'; ?></td> 227 <?php echo ($tidy_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
216 </tr> 228 </tr>
217 <tr class="<?php echo ($curl_ok) ? 'enabled' : 'disabled'; ?>"> 229 <tr class="<?php echo ($curl_ok) ? 'enabled' : 'disabled'; ?>">
218 <td><a href="http://php.net/curl">cURL</a></td> 230 <td><a href="http://php.net/curl">cURL</a></td>
219 <td>Enabled</td> 231 <td>Enabled</td>
220 <td><?php echo (extension_loaded('curl')) ? 'Enabled' : 'Disabled'; ?></td> 232 <?php echo (extension_loaded('curl')) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
221 </tr> 233 </tr>
222 <tr class="<?php echo ($parallel_ok) ? 'enabled' : 'disabled'; ?>"> 234 <tr class="<?php echo ($parallel_ok) ? 'enabled' : 'disabled'; ?>">
223 <td>Parallel URL fetching</td> 235 <td>Parallel URL fetching</td>
224 <td>Enabled</td> 236 <td>Enabled</td>
225 <td><?php echo ($parallel_ok) ? 'Enabled' : 'Disabled'; ?></td> 237 <?php echo ($parallel_ok) ? '<td class="good">Enabled' : '<td class="pass">Disabled'; ?></td>
226 </tr> 238 </tr>
227 <tr class="<?php echo ($allow_url_fopen_ok) ? 'enabled' : 'disabled'; ?>"> 239 <tr class="<?php echo ($allow_url_fopen_ok) ? 'enabled' : 'disabled'; ?>">
228 <td><a href="http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen">allow_url_fopen</a></td> 240 <td><a href="http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen">allow_url_fopen</a></td>
229 <td>Enabled</td> 241 <td>Enabled</td>
230 <td><?php echo ($allow_url_fopen_ok) ? 'Enabled' : 'Disabled'; ?></td> 242 <?php echo ($allow_url_fopen_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
231 </tr> 243 </tr>
244 <tr class="<?php echo ($gettext_ok) ? 'enabled' : 'disabled'; ?>">
245 <td><a href="http://php.net/manual/en/book.gettext.php">gettext</a></td>
246 <td>Enabled</td>
247 <?php echo ($gettext_ok) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
248 </tr>
232 </tbody> 249 </tbody>
233 </table> 250 </table>
234 </div> 251 </div>
@@ -237,7 +254,7 @@ div.chunk {
237 <h3>What does this mean?</h3> 254 <h3>What does this mean?</h3>
238 <ol> 255 <ol>
239 <?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): ?> 256 <?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): ?>
240 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok): ?> 257 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $tidy_ok && $curl_ok && $parallel_ok && $allow_url_fopen_ok && $gettext_ok): ?>
241 <li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li> 258 <li><em>You have everything you need to run <?php echo $app_name; ?> properly! Congratulations!</em></li>
242 <?php else: ?> 259 <?php else: ?>
243 <?php if ($php_ok): ?> 260 <?php if ($php_ok): ?>
@@ -250,59 +267,66 @@ div.chunk {
250 <?php if ($allow_url_fopen_ok): ?> 267 <?php if ($allow_url_fopen_ok): ?>
251 <li><strong>allow_url_fopen:</strong> You have allow_url_fopen enabled. <em>No problems here.</em></li> 268 <li><strong>allow_url_fopen:</strong> You have allow_url_fopen enabled. <em>No problems here.</em></li>
252 269
253 <?php if ($filter_ok): ?> 270 <?php if ($gettext_ok): ?>
254 <li><strong>Data filtering:</strong> You have the PHP filter extension enabled. <em>No problems here.</em></li> 271 <li><strong>Gettext:</strong> You have <code>gettext</code> enabled. <em>No problems here.</em></li>
272
273 <?php if ($filter_ok): ?>
274 <li><strong>Data filtering:</strong> You have the PHP filter extension enabled. <em>No problems here.</em></li>
255 275
256 <?php if ($zlib_ok): ?> 276 <?php if ($zlib_ok): ?>
257 <li><strong>Zlib:</strong> You have <code>Zlib</code> enabled. This allows SimplePie to support GZIP-encoded feeds. <em>No problems here.</em></li> 277 <li><strong>Zlib:</strong> You have <code>Zlib</code> enabled. This allows SimplePie to support GZIP-encoded feeds. <em>No problems here.</em></li>
258 <?php else: ?> 278 <?php else: ?>
259 <li><strong>Zlib:</strong> The <code>Zlib</code> extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.</li> 279 <li><strong>Zlib:</strong> The <code>Zlib</code> extension is not available. SimplePie will ignore any GZIP-encoding, and instead handle feeds as uncompressed text.</li>
260 <?php endif; ?> 280 <?php endif; ?>
281
282 <?php if ($mbstring_ok && $iconv_ok): ?>
283 <li><strong>mbstring and iconv:</strong> You have both <code>mbstring</code> and <code>iconv</code> installed! This will allow <?php echo $app_name; ?> to handle the greatest number of languages. <em>No problems here.</em></li>
284 <?php elseif ($mbstring_ok): ?>
285 <li><strong>mbstring:</strong> <code>mbstring</code> is installed, but <code>iconv</code> is not.</li>
286 <?php elseif ($iconv_ok): ?>
287 <li><strong>iconv:</strong> <code>iconv</code> is installed, but <code>mbstring</code> is not.</li>
288 <?php else: ?>
289 <li><strong>mbstring and iconv:</strong> <em>You do not have either of the extensions installed.</em> This will significantly impair your ability to read non-English feeds, as well as even some English ones.</li>
290 <?php endif; ?>
291
292 <?php if ($tidy_ok): ?>
293 <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed. <em>No problems here.</em></li>
294 <?php else: ?>
295 <li><strong>Tidy:</strong> The <code>Tidy</code> extension is not available. <?php echo $app_name; ?> should still work with most feeds, but you may experience problems with some.</li>
296 <?php endif; ?>
297
298 <?php if ($curl_ok): ?>
299 <li><strong>cURL:</strong> You have <code>cURL</code> support installed. <em>No problems here.</em></li>
300 <?php else: ?>
301 <li><strong>cURL:</strong> The <code>cURL</code> extension is not available. SimplePie will use <code>fsockopen()</code> instead.</li>
302 <?php endif; ?>
261 303
262 <?php if ($mbstring_ok && $iconv_ok): ?> 304 <?php if ($parallel_ok): ?>
263 <li><strong>mbstring and iconv:</strong> You have both <code>mbstring</code> and <code>iconv</code> installed! This will allow <?php echo $app_name; ?> to handle the greatest number of languages. <em>No problems here.</em></li> 305 <li><strong>Parallel URL fetching:</strong> You have <code>HttpRequestPool</code> or <code>curl_multi</code> support installed. <em>No problems here.</em></li>
264 <?php elseif ($mbstring_ok): ?> 306 <?php else: ?>
265 <li><strong>mbstring:</strong> <code>mbstring</code> is installed, but <code>iconv</code> is not.</li> 307 <li><strong>Parallel URL fetching:</strong> <code>HttpRequestPool</code> or <code>curl_multi</code> support is not available. <?php echo $app_name; ?> will use <code>file_get_contents()</code> instead to fetch URLs sequentially rather than in parallel.</li>
266 <?php elseif ($iconv_ok): ?> 308 <?php endif; ?>
267 <li><strong>iconv:</strong> <code>iconv</code> is installed, but <code>mbstring</code> is not.</li>
268 <?php else: ?>
269 <li><strong>mbstring and iconv:</strong> <em>You do not have either of the extensions installed.</em> This will significantly impair your ability to read non-English feeds, as well as even some English ones.</li>
270 <?php endif; ?>
271 309
272 <?php if ($tidy_ok): ?>
273 <li><strong>Tidy:</strong> You have <code>Tidy</code> support installed. <em>No problems here.</em></li>
274 <?php else: ?> 310 <?php else: ?>
275 <li><strong>Tidy:</strong> The <code>Tidy</code> extension is not available. <?php echo $app_name; ?> should still work with most feeds, but you may experience problems with some.</li> 311 <li><strong>Data filtering:</strong> Your PHP configuration has the filter extension disabled. <strong><?php echo $app_name; ?> will not work here.</strong></li>
276 <?php endif; ?> 312 <?php endif; ?>
277 313
278 <?php if ($curl_ok): ?>
279 <li><strong>cURL:</strong> You have <code>cURL</code> support installed. <em>No problems here.</em></li>
280 <?php else: ?>
281 <li><strong>cURL:</strong> The <code>cURL</code> extension is not available. SimplePie will use <code>fsockopen()</code> instead.</li>
282 <?php endif; ?>
283
284 <?php if ($parallel_ok): ?>
285 <li><strong>Parallel URL fetching:</strong> You have <code>HttpRequestPool</code> or <code>curl_multi</code> support installed. <em>No problems here.</em></li>
286 <?php else: ?>
287 <li><strong>Parallel URL fetching:</strong> <code>HttpRequestPool</code> or <code>curl_multi</code> support is not available. <?php echo $app_name; ?> will use <code>file_get_contents()</code> instead to fetch URLs sequentially rather than in parallel.</li>
288 <?php endif; ?>
289
290 <?php else: ?> 314 <?php else: ?>
291 <li><strong>Data filtering:</strong> Your PHP configuration has the filter extension disabled. <em><?php echo $app_name; ?> will not work here.</em></li> 315 <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>
292 <?php endif; ?> 316 <?php endif; ?>
293 317
294 <?php else: ?> 318 <?php else: ?>
295 <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> 319 <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>
296 <?php endif; ?> 320 <?php endif; ?>
297 321
298 <?php else: ?> 322 <?php else: ?>
299 <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> 323 <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>
300 <?php endif; ?> 324 <?php endif; ?>
301 <?php else: ?> 325 <?php else: ?>
302 <li><strong>XML:</strong> Your PHP installation doesn't support XML parsing. <em><?php echo $app_name; ?> will not work here.</em></li> 326 <li><strong>XML:</strong> Your PHP installation doesn't support XML parsing. <strong><?php echo $app_name; ?> will not work here.</strong></li>
303 <?php endif; ?> 327 <?php endif; ?>
304 <?php else: ?> 328 <?php else: ?>
305 <li><strong>PHP:</strong> You are running an unsupported version of PHP. <em><?php echo $app_name; ?> will not work here.</em></li> 329 <li><strong>PHP:</strong> You are running an unsupported version of PHP. <strong><?php echo $app_name; ?> will not work here.</strong></li>
306 <?php endif; ?> 330 <?php endif; ?>
307 <?php endif; ?> 331 <?php endif; ?>
308 </ol> 332 </ol>
@@ -310,16 +334,18 @@ div.chunk {
310 334
311 <div class="chunk"> 335 <div class="chunk">
312 <?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $allow_url_fopen_ok) { ?> 336 <?php //if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $iconv_ok && $filter_ok && $allow_url_fopen_ok) { ?>
313 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok) { ?> 337 <?php if ($php_ok && $xml_ok && $pcre_ok && $filter_ok && $allow_url_fopen_ok && $gettext_ok) { ?>
314 <h3>Bottom Line: Yes, you can!</h3> 338 <h3>Bottom Line: Yes, you can!</h3>
315 <p><em>Your webhost has its act together!</em></p> 339 <p><em>Your webhost has its act together!</em></p>
316 <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p> 340 <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p>
341 <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>
317 <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost &mdash; it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p> 342 <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost &mdash; it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p>
318 <?php //} else if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $allow_url_fopen_ok && $filter_ok) { ?> 343 <?php //} else if ($php_ok && $xml_ok && $pcre_ok && $mbstring_ok && $allow_url_fopen_ok && $filter_ok) { ?>
319 <?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok) { ?> 344 <?php } else if ($php_ok && $xml_ok && $pcre_ok && $allow_url_fopen_ok && $filter_ok && $gettext_ok) { ?>
320 <h3>Bottom Line: Yes, you can!</h3> 345 <h3>Bottom Line: Yes, you can!</h3>
321 <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> 346 <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>
322 <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p> 347 <p>You can download the latest version of <?php echo $app_name; ?> from <a href="http://wallabag.org/download">wallabag.org</a>.</p>
348 <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>
323 <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost &mdash; it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p> 349 <p><strong>Note</strong>: Passing this test does not guarantee that <?php echo $app_name; ?> will run on your webhost &mdash; it only ensures that the basic requirements have been addressed. If you experience any problems, please let us know.</p>
324 <?php } else { ?> 350 <?php } else { ?>
325 <h3>Bottom Line: We're sorry…</h3> 351 <h3>Bottom Line: We're sorry…</h3>