Rev 315 | Rev 419 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 315 | Rev 360 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | // (e.g. Debian 9 which has LTS support till May 2022). |
29 | // (e.g. Debian 9 which has LTS support till May 2022). |
30 | // Therefore we commented out following features which would require PHP 7.1: |
30 | // Therefore we commented out following features which would require PHP 7.1: |
31 | // - Nullable return values (e.g. "function foo(): ?array") |
31 | // - Nullable return values (e.g. "function foo(): ?array") |
32 | // - void return value (e.g. "function foo(): void") => currently commented out |
32 | // - void return value (e.g. "function foo(): void") => currently commented out |
33 | // - private/protected/public consts => currently commented out |
33 | // - private/protected/public consts => currently commented out |
34 | echo '<h1>OIDplus error</h1>'; |
34 | echo '<h1>'._L('OIDplus error').'</h1>'; |
35 | echo "<p>OIDplus requires at least PHP version 7.0! You are currently using version " . PHP_VERSION . "</p>\n"; |
35 | echo '<p>'._L('OIDplus requires at least PHP version %1! You are currently using version %2','7.0',PHP_VERSION).'</p>'."\n"; |
36 | die(); |
36 | die(); |
37 | } |
37 | } |
38 | 38 | ||
39 | include_once __DIR__ . '/gmp_supplement.inc.php'; |
39 | include_once __DIR__ . '/gmp_supplement.inc.php'; |
40 | 40 | ||
Line 44... | Line 44... | ||
44 | // GMP Required for includes/uuid_functions.inc.php |
44 | // GMP Required for includes/uuid_functions.inc.php |
45 | // includes/ipv6_functions.inc.php |
45 | // includes/ipv6_functions.inc.php |
46 | // plugins/adminPages/400_oidinfo_export/oidinfo_api.inc.php (if GMP is not available, BC will be used) |
46 | // plugins/adminPages/400_oidinfo_export/oidinfo_api.inc.php (if GMP is not available, BC will be used) |
47 | // Note that gmp_supplement.inc.php will implement the GMP functions if BCMath is present. |
47 | // Note that gmp_supplement.inc.php will implement the GMP functions if BCMath is present. |
48 | // This is the reason why we use function_exists('gmp_init') instead of extension_loaded('gmp') |
48 | // This is the reason why we use function_exists('gmp_init') instead of extension_loaded('gmp') |
49 | $missing_dependencies[] = 'GMP (Install it using <code>sudo aptitude update && sudo aptitude install php-gmp && sudo service apache2 restart</code> on Linux systems.)' . |
49 | $missing_dependencies[] = _L('GMP (Install it using <code>sudo aptitude update && sudo aptitude install php-gmp && sudo service apache2 restart</code> on Linux systems.)') . |
50 | '<br>or alternatively<br>' . |
50 | '<br>'._L('or alternatively').'<br>' . |
51 | 'BCMath (Install it using <code>sudo aptitude update && sudo aptitude install php-bcmath && sudo service apache2 restart</code> on Linux systems.)'; |
51 | _L('BCMath (Install it using <code>sudo aptitude update && sudo aptitude install php-bcmath && sudo service apache2 restart</code> on Linux systems.)'); |
52 | } |
52 | } |
53 | 53 | ||
54 | if (!function_exists('mb_substr')) { |
54 | if (!function_exists('mb_substr')) { |
55 | // Required for includes/classes/OIDplusSessionHandler.class.php |
55 | // Required for includes/classes/OIDplusSessionHandler.class.php |
56 | // includes/oid_utils.inc.php |
56 | // includes/oid_utils.inc.php |
57 | // 3p/minify/path-converter/Converter.php |
57 | // 3p/minify/path-converter/Converter.php |
58 | // 3p/0xbb/Sha3.class.php |
58 | // 3p/0xbb/Sha3.class.php |
59 | $missing_dependencies[] = 'MBString (Install it using <code>sudo aptitude update && sudo aptitude install php-mbstring && sudo service apache2 restart</code> on Linux systems.)'; |
59 | $missing_dependencies[] = _L('MBString (Install it using <code>sudo aptitude update && sudo aptitude install php-mbstring && sudo service apache2 restart</code> on Linux systems.)'); |
60 | } |
60 | } |
61 | 61 | ||
62 | if (count($missing_dependencies) >= 1) { |
62 | if (count($missing_dependencies) >= 1) { |
63 | echo '<h1>OIDplus error</h1>'; |
63 | echo '<h1>'._L('OIDplus error').'</h1>'; |
64 | echo '<p>The following PHP extensions need to be installed in order to run OIDplus.</p>'; |
64 | echo '<p>'._L('The following PHP extensions need to be installed in order to run OIDplus:').'</p>'; |
65 | echo '<ul>'; |
65 | echo '<ul>'; |
66 | foreach ($missing_dependencies as $dependency) { |
66 | foreach ($missing_dependencies as $dependency) { |
67 | echo '<li>'.$dependency.'</li>'; |
67 | echo '<li>'.$dependency.'</li>'; |
68 | } |
68 | } |
69 | echo '</ul>'; |
69 | echo '</ul>'; |