Merge branch '3.0' into 3.1
[GitHub/WoltLab/WCF.git] / wcfsetup / test.php
1 <!DOCTYPE html>
2 <html dir="ltr" lang="en">
3 <head>
4 <title>WoltLab Suite 3.1 System Requirements</title>
5 </head>
6 <body>
7 <?php
8 /**
9 * Tests the support of PHP 5.5.4 or greater.
10 * ><p><b>Support for PHP is missing.<br>PHP Unterst&uuml;tzung nicht gefunden</b></p> <!--
11 *
12 * @author Marcel Werk
13 * @copyright 2001-2018 WoltLab GmbH
14 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 */
16 // @codingStandardsIgnoreFile
17 // check php version
18 // php version
19 $phpVersion = phpversion();
20 $comparePhpVersion = preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $phpVersion);
21 $neededPhpVersion = '5.5.4';
22 $configArray = @ini_get_all();
23 if (!(version_compare($comparePhpVersion, $neededPhpVersion) >= 0)) {
24 ?>
25 <p style="color:red;" >Your PHP version '<?php echo $phpVersion; ?>' is insufficient for installation of this software. PHP version <?php echo $neededPhpVersion; ?> or greater is required.<br>
26 Ihre PHP Version '<?php echo $phpVersion; ?>' ist unzureichend f&uuml;r die Installation dieser Software. PHP Version <?php echo $neededPhpVersion; ?> oder h&ouml;her wird ben&ouml;tigt.</p>
27 <?php
28 }
29
30 // check mbstring
31 else if (!extension_loaded('mbstring')) {
32 ?>
33 <p>The 'mbstring' PHP extension is missing. Mbstring is required for a stable work of this software.<br>
34 Die 'mbstring' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
35 <?php
36 }
37
38 // check libxml
39 else if (!extension_loaded('libxml')) {
40 ?>
41 <p>The 'libxml' PHP extension is missing. Libxml is required for a stable work of this software.<br>
42 Die 'libxml' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
43 <?php
44 }
45
46 // check DOM
47 else if (!extension_loaded('dom')) {
48 ?>
49 <p>The 'DOM' PHP extension is missing. DOM is required for a stable work of this software.<br>
50 Die 'DOM' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
51 <?php
52 }
53
54 // check zlib extension
55 else if (!extension_loaded('zlib')) {
56 ?>
57 <p>The 'zlib' PHP extension is missing. ZLib is required for a stable work of this software.<br>
58 Die 'zlib' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
59 <?php
60 }
61
62 // check PDO extension
63 else if (!extension_loaded('pdo')) {
64 ?>
65 <p>The 'PDO' PHP extension is missing. PDO is required for a stable work of this software.<br>
66 Die 'PDO' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
67 <?php
68 }
69
70 // check PDO MySQL extension
71 else if (!extension_loaded('pdo_mysql')) {
72 ?>
73 <p>The 'PDO_MYSQL' PHP extension is missing. PDO_MYSQL is required for a stable work of this software.<br>
74 Die 'PDO_MYSQL' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
75 <?php
76 }
77
78 // check JSON extension
79 else if (!extension_loaded('json')) {
80 ?>
81 <p>The 'JSON' PHP extension is missing. JSON is required for a stable work of this software.<br>
82 Die 'JSON' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
83 <?php
84 }
85
86 // check PCRE extension
87 else if (!extension_loaded('pcre')) {
88 ?>
89 <p>The 'PCRE' PHP extension is missing. PCRE is required for a stable work of this software.<br>
90 Die 'PCRE' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
91 <?php
92 }
93
94 // check GD extension
95 else if (!extension_loaded('gd')) {
96 ?>
97 <p>The 'GD' PHP extension is missing. GD is required for a stable work of this software.<br>
98 Die 'GD' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
99 <?php
100 }
101
102 // check Hash extension
103 else if (!extension_loaded('hash')) {
104 ?>
105 <p>The 'Hash' PHP extension is missing. Hash is required for a stable work of this software.<br>
106 Die 'Hash' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
107 <?php
108 }
109
110 // check whether Hash extension is sane
111 else if (!in_array('sha256', hash_algos())) {
112 ?>
113 <p>The 'Hash' PHP extension is broken. It needs to support the SHA-256 algorithm.<br>
114 Die 'Hash' Erweiterung f&uuml;r PHP ist kaputt. Sie unterstützt die SHA-256-Hashfunktion nicht.</p>
115 <?php
116 }
117
118 // everything is fine
119 else {
120 ?>
121 <p style="color:green;">PHP <?php echo $neededPhpVersion; ?> or greater is available. You can <a href="install.php">start</a> the installation now.<br>
122 PHP <?php echo $neededPhpVersion; ?> oder h&ouml;her wurde gefunden. Sie k&ouml;nnen mit der Installation <a href="install.php">beginnen</a>.</p>
123 <?php
124 }
125 ?>
126 </body>
127 </html>