Merge branch '3.0'
[GitHub/WoltLab/WCF.git] / wcfsetup / test.php
CommitLineData
e5f9b56c
MW
1<!DOCTYPE html>
2<html dir="ltr" lang="en">
158bd3ca 3<head>
ff9cab71 4 <title>WoltLab Suite 3.1 System Requirements</title>
158bd3ca
TD
5</head>
6<body>
7<?php
8/**
f7d7f59a 9 * Tests the support of PHP 5.5.4 or greater.
e5f9b56c 10 * ><p><b>Support for PHP is missing.<br>PHP Unterst&uuml;tzung nicht gefunden</b></p> <!--
158bd3ca
TD
11 *
12 * @author Marcel Werk
c839bd49 13 * @copyright 2001-2018 WoltLab GmbH
158bd3ca
TD
14 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 */
392cd6cb 16// @codingStandardsIgnoreFile
158bd3ca
TD
17// check php version
18// php version
19$phpVersion = phpversion();
20$comparePhpVersion = preg_replace('/^(\d+\.\d+\.\d+).*$/', '\\1', $phpVersion);
f7d7f59a 21$neededPhpVersion = '5.5.4';
034b5898 22$configArray = @ini_get_all();
a80ecc3e 23if (!(version_compare($comparePhpVersion, $neededPhpVersion) >= 0)) {
158bd3ca 24 ?>
e5f9b56c 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>
a80ecc3e 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>
158bd3ca
TD
27 <?php
28}
29
dcaa83fc
MW
30// check mbstring
31else if (!extension_loaded('mbstring')) {
158bd3ca 32 ?>
e5f9b56c 33 <p>The 'mbstring' PHP extension is missing. Mbstring is required for a stable work of this software.<br>
dcaa83fc
MW
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
39else if (!extension_loaded('libxml')) {
158bd3ca 40 ?>
e5f9b56c 41 <p>The 'libxml' PHP extension is missing. Libxml is required for a stable work of this software.<br>
dcaa83fc 42 Die 'libxml' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
158bd3ca
TD
43 <?php
44}
45
dcaa83fc
MW
46// check DOM
47else if (!extension_loaded('dom')) {
158bd3ca 48 ?>
e5f9b56c 49 <p>The 'DOM' PHP extension is missing. DOM is required for a stable work of this software.<br>
dcaa83fc 50 Die 'DOM' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
158bd3ca
TD
51 <?php
52}
53
54// check zlib extension
dcaa83fc 55else if (!extension_loaded('zlib')) {
158bd3ca 56 ?>
e5f9b56c 57 <p>The 'zlib' PHP extension is missing. ZLib is required for a stable work of this software.<br>
158bd3ca
TD
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
dcaa83fc
MW
62// check PDO extension
63else if (!extension_loaded('pdo')) {
64 ?>
e5f9b56c 65 <p>The 'PDO' PHP extension is missing. PDO is required for a stable work of this software.<br>
dcaa83fc
MW
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
71else if (!extension_loaded('pdo_mysql')) {
72 ?>
e5f9b56c 73 <p>The 'PDO_MYSQL' PHP extension is missing. PDO_MYSQL is required for a stable work of this software.<br>
dcaa83fc
MW
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
b9155aa1
MW
78// check JSON extension
79else if (!extension_loaded('json')) {
80 ?>
e5f9b56c 81 <p>The 'JSON' PHP extension is missing. JSON is required for a stable work of this software.<br>
b9155aa1
MW
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
a263a3ea
MW
86// check PCRE extension
87else if (!extension_loaded('pcre')) {
88 ?>
e5f9b56c 89 <p>The 'PCRE' PHP extension is missing. PCRE is required for a stable work of this software.<br>
a263a3ea
MW
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
20d16749
AE
94// check GD extension
95else if (!extension_loaded('gd')) {
96 ?>
e5f9b56c 97 <p>The 'GD' PHP extension is missing. GD is required for a stable work of this software.<br>
20d16749 98 Die 'GD' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
a263a3ea
MW
99 <?php
100}
101
9fe8b50c
TD
102// check Hash extension
103else if (!extension_loaded('hash')) {
104 ?>
e5f9b56c 105 <p>The 'Hash' PHP extension is missing. Hash is required for a stable work of this software.<br>
9fe8b50c
TD
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
111else if (!in_array('sha256', hash_algos())) {
112 ?>
e5f9b56c 113 <p>The 'Hash' PHP extension is broken. It needs to support the SHA-256 algorithm.<br>
9fe8b50c
TD
114 Die 'Hash' Erweiterung f&uuml;r PHP ist kaputt. Sie unterstützt die SHA-256-Hashfunktion nicht.</p>
115 <?php
116}
117
034b5898 118// everything is fine
158bd3ca
TD
119else {
120 ?>
e5f9b56c 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>
a80ecc3e 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>
158bd3ca
TD
123 <?php
124}
125?>
126</body>
16365ba1 127</html>