dolibarr/htdocs/admin/system/phpinfo.php

382 lines
11 KiB
PHP
Raw Normal View History

<?php
2012-08-02 10:07:55 +02:00
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
2012-09-21 00:13:20 +02:00
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
2018-10-27 14:43:12 +02:00
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
2020-04-08 11:46:45 +02:00
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2020 Tobias Sekan <tobias.sekan@startmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
fix ignored phpstan (most of expects string, int given) (#30649) * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan
2024-09-05 16:05:37 +02:00
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
2002-04-30 12:51:35 +02:00
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
2002-04-30 12:51:35 +02:00
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2002-04-30 12:51:35 +02:00
*/
/**
2009-01-18 18:35:29 +01:00
* \file htdocs/admin/system/phpinfo.php
* \brief Page des infos systeme de php
2009-01-18 18:35:29 +01:00
*/
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
require '../../main.inc.php';
2013-06-05 16:24:32 +02:00
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
add baseline exclude for phpstan (#31632) * add baseline exclude for phpstan * update * update * update * update * update * merge * restore one filter * delete old errors * fix * fix * fix * $moreforfilter can t be empty * fix * enable check * refresh baseline * add phpdoc * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * update phpstan baseline * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix * fix --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/
$langs->loadLangs(array("admin", "install", "errors"));
2021-02-26 22:04:03 +01:00
if (!$user->admin) {
2012-08-02 10:07:55 +02:00
accessforbidden();
2021-02-26 22:04:03 +01:00
}
2012-08-02 10:07:55 +02:00
2009-01-18 18:35:29 +01:00
/*
* View
*/
llxHeader('', '', '', '', 0, 0, '', '', '', 'mod-admin page-system_phpinfo');
$title = 'InfoPHP';
2009-01-18 18:35:29 +01:00
2021-02-26 22:04:03 +01:00
if (isset($title)) {
print load_fiche_titre($langs->trans($title), '', 'title_setup');
2012-09-30 21:26:58 +02:00
}
2009-01-18 18:35:29 +01:00
// Check PHP setup is OK
$maxphp = @ini_get('upload_max_filesize'); // In unknown
2020-12-29 17:48:52 +01:00
if (preg_match('/k$/i', $maxphp)) {
2021-02-26 22:04:03 +01:00
$maxphp = preg_replace('/k$/i', '', $maxphp);
$maxphp *= 1;
2020-12-29 17:48:52 +01:00
}
if (preg_match('/m$/i', $maxphp)) {
2021-02-26 22:04:03 +01:00
$maxphp = preg_replace('/m$/i', '', $maxphp);
$maxphp *= 1024;
2020-12-29 17:48:52 +01:00
}
if (preg_match('/g$/i', $maxphp)) {
2021-02-26 22:04:03 +01:00
$maxphp = preg_replace('/g$/i', '', $maxphp);
$maxphp *= 1024 * 1024;
2020-12-29 17:48:52 +01:00
}
if (preg_match('/t$/i', $maxphp)) {
2021-02-26 22:04:03 +01:00
$maxphp = preg_replace('/t$/i', '', $maxphp);
$maxphp *= 1024 * 1024 * 1024;
2020-12-29 17:48:52 +01:00
}
$maxphp2 = @ini_get('post_max_size'); // In unknown
2020-12-29 17:48:52 +01:00
if (preg_match('/k$/i', $maxphp2)) {
2021-02-26 22:04:03 +01:00
$maxphp2 = preg_replace('/k$/i', '', $maxphp2);
$maxphp2 *= 1;
2020-12-29 17:48:52 +01:00
}
if (preg_match('/m$/i', $maxphp2)) {
2021-02-26 22:04:03 +01:00
$maxphp2 = preg_replace('/m$/i', '', $maxphp2);
$maxphp2 *= 1024;
2020-12-29 17:48:52 +01:00
}
if (preg_match('/g$/i', $maxphp2)) {
2021-02-26 22:04:03 +01:00
$maxphp2 = preg_replace('/g$/i', '', $maxphp2);
$maxphp2 *= 1024 * 1024;
2020-12-29 17:48:52 +01:00
}
if (preg_match('/t$/i', $maxphp2)) {
2021-02-26 22:04:03 +01:00
$maxphp2 = preg_replace('/t$/i', '', $maxphp2);
$maxphp2 *= 1024 * 1024 * 1024;
2020-12-29 17:48:52 +01:00
}
2021-02-26 22:04:03 +01:00
if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2) {
$langs->load("errors");
fix ignored phpstan (most of expects string, int given) (#30649) * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * fix ignored phpstan * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * more ignore * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan
2024-09-05 16:05:37 +02:00
print info_admin($langs->trans("WarningParamUploadMaxFileSizeHigherThanPostMaxSize", @ini_get('upload_max_filesize'), @ini_get('post_max_size')), 0, 0, '0', 'warning');
print '<br>';
}
2020-04-08 11:46:45 +02:00
2019-11-05 21:24:41 +01:00
print '<table class="noborder centpercent">';
2024-09-03 11:19:01 +02:00
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameter").'</td><td></td></tr>';
2013-06-05 16:24:32 +02:00
2020-01-15 10:02:18 +01:00
$ErrorPicturePath = "../../theme/eldy/img/error.png";
$WarningPicturePath = "../../theme/eldy/img/warning.png";
$OkayPicturePath = "../../theme/eldy/img/tick.png";
2021-02-02 09:44:51 +01:00
print '<tr><td>'.$langs->trans("Version").'</td><td>';
$arrayphpminversionerror = array(5, 5, 0);
$arrayphpminversionwarning = array(5, 6, 0);
2020-04-08 11:46:45 +02:00
2021-02-26 22:04:03 +01:00
if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) {
2024-09-02 22:46:14 +02:00
print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror));
2021-02-26 22:04:03 +01:00
} elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) {
2024-09-02 22:46:14 +02:00
print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning));
2020-05-21 09:35:30 +02:00
} else {
2024-09-02 22:46:14 +02:00
print img_picto('Ok', 'tick').' '.versiontostring(versionphparray());
2020-01-15 10:02:18 +01:00
}
print '</td></tr>';
print '<tr><td>GET and POST support</td><td>';
2024-03-28 17:10:22 +01:00
if (!isset($_GET["testget"]) && !isset($_POST["testpost"]) && !isset($_GET["mainmenu"])) { // We must keep $_GET and $_POST here. This is a specific test.
2024-09-02 22:46:14 +02:00
print img_picto('Warning', 'warning').' '.$langs->trans("PHPSupportPOSTGETKo");
2020-04-08 11:46:45 +02:00
print ' (<a href="'.$_SERVER["PHP_SELF"].'?testget=ok">'.$langs->trans("Recheck").'</a>)';
2020-05-21 09:35:30 +02:00
} else {
2024-09-02 22:46:14 +02:00
print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportPOSTGETOk");
2020-01-15 10:02:18 +01:00
}
print '</td></tr>';
print '<tr><td>Sessions support</td><td>';
2021-02-26 22:04:03 +01:00
if (!function_exists("session_id")) {
2024-09-02 22:46:14 +02:00
print img_picto('Error', 'error').' '.$langs->trans("ErrorPHPDoesNotSupportSessions");
2020-05-21 09:35:30 +02:00
} else {
2024-09-02 22:46:14 +02:00
print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupportSessions");
2020-01-15 10:02:18 +01:00
}
print '</td></tr>';
2020-09-08 02:59:49 +02:00
2020-04-08 11:46:45 +02:00
print '<tr><td>UTF-8 support</td><td>';
2021-02-26 22:04:03 +01:00
if (!function_exists("utf8_encode")) {
2024-09-02 22:46:14 +02:00
print img_picto('Warning', 'warning').' '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8");
2020-05-21 09:35:30 +02:00
} else {
2024-09-02 22:46:14 +02:00
print img_picto('Ok', 'tick').' '.$langs->trans("PHPSupport", "UTF8");
2020-01-15 10:02:18 +01:00
}
print '</td></tr>';
2020-09-08 02:59:49 +02:00
2020-04-08 11:46:45 +02:00
print '</table>';
2020-01-15 10:02:18 +01:00
2020-04-08 11:46:45 +02:00
print '<br>';
2020-01-15 10:02:18 +01:00
$activatedExtensions = array();
2020-04-08 11:46:45 +02:00
$loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
2020-04-08 11:46:45 +02:00
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
2021-02-02 09:44:51 +01:00
print '<td class="titlefield">'.$langs->trans("Extension").'</td>';
print '<td>'.$langs->trans("Test").'</td>';
2020-04-08 11:46:45 +02:00
print '</tr>';
2020-11-11 16:08:00 +01:00
$functions = ["mb_check_encoding"];
$name = "MBString";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
$functions = ["json_decode"];
$name = "JSON";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
2020-04-08 11:46:45 +02:00
$functions = ["imagecreate"];
$name = "GD";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
$functions = ["curl_init"];
$name = "Curl";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
2022-05-09 12:13:31 +02:00
print "</tr>";
$functions = ["easter_date"];
$name = "Calendar";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
$functions = ["simplexml_load_string"];
$name = "Xml";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
2020-04-08 11:46:45 +02:00
print "</tr>";
2021-02-26 22:04:03 +01:00
if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@localhost') {
2020-04-08 11:46:45 +02:00
$functions = ["locale_get_primary_language", "locale_get_region"];
$name = "Intl";
2020-01-15 10:02:18 +01:00
2020-04-08 11:46:45 +02:00
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
2020-01-16 01:11:39 +01:00
}
2020-12-10 16:05:43 +01:00
$functions = ["imap_open"];
$name = "IMAP";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
2022-09-28 19:59:51 +02:00
$functions = array();
$name = "zip";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
2020-04-08 11:46:45 +02:00
$functions = array();
$name = "xDebug";
print "<tr>";
print "<td>".$name."</td>";
print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
print "</tr>";
2020-01-15 10:02:18 +01:00
print '</table>';
2020-01-15 12:56:36 +01:00
print '<br>';
2012-09-30 21:26:58 +02:00
// Get php_info array
$phparray = phpinfo_array();
2021-02-26 22:04:03 +01:00
foreach ($phparray as $key => $value) {
2020-04-08 11:46:45 +02:00
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder">';
2012-09-30 21:26:58 +02:00
print '<tr class="liste_titre">';
2021-02-02 09:44:51 +01:00
print '<td class="titlefield">'.$key.'</td>';
2024-09-03 11:19:01 +02:00
print '<td colspan="2"></td>';
2012-09-30 21:26:58 +02:00
print "</tr>\n";
2012-09-21 00:13:20 +02:00
//var_dump($value);
2021-02-26 22:04:03 +01:00
foreach ($value as $keyparam => $keyvalue) {
if (!is_array($keyvalue)) {
2022-11-15 09:36:35 +01:00
$keytoshow = $keyparam;
$valtoshow = $keyvalue;
2023-03-19 11:06:48 +01:00
2022-11-15 09:36:35 +01:00
// Hide value of session cookies
if (in_array($keyparam, array('HTTP_COOKIE', 'Cookie', "\$_SERVER['HTTP_COOKIE']", 'Authorization'))) {
$valtoshow = '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>';
}
if (preg_match('/'.preg_quote('$_COOKIE[\'DOLSESSID_', '/').'/i', $keyparam)) {
$keytoshow = $keyparam;
$valtoshow = '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>';
}
2023-03-19 11:06:48 +01:00
if (preg_match('/'.preg_quote('$_SERVER[\'PHP_AUTH_PW', '/').'/i', $keyparam)) {
$keytoshow = $keyparam;
$valtoshow = '<span class="opacitymedium">'.$langs->trans("Hidden").'</span>';
}
2022-11-15 09:36:35 +01:00
print '<tr class="oddeven">';
print '<td>'.$keytoshow.'</td>';
2021-02-26 22:04:03 +01:00
if ($keyparam == 'X-ChromePhp-Data') {
$valtoshow = dol_trunc($keyvalue, 80);
}
2020-11-11 16:15:06 +01:00
print '<td colspan="2" class="wordbreak">';
2021-02-26 22:04:03 +01:00
if ($keyparam == 'Path') {
$valtoshow = implode('; ', explode(';', trim($valtoshow)));
}
if ($keyparam == 'PATH') {
$valtoshow = implode('; ', explode(';', trim($valtoshow)));
}
if ($keyparam == '_SERVER["PATH"]') {
$valtoshow = implode('; ', explode(';', trim($valtoshow)));
}
print $valtoshow;
print '</td>';
2012-09-21 00:13:20 +02:00
print '</tr>';
2020-05-21 09:35:30 +02:00
} else {
2017-04-13 15:59:51 +02:00
print '<tr class="oddeven">';
print '<td class="wordbreak">'.$keyparam.'</td>';
$i = 0;
2021-02-26 22:04:03 +01:00
foreach ($keyvalue as $keyparam2 => $keyvalue2) {
2012-09-21 00:13:20 +02:00
print '<td>';
$valtoshow = $keyvalue2;
2021-02-26 22:04:03 +01:00
if ($keyparam == 'disable_functions') {
$valtoshow = implode(', ', explode(',', trim($valtoshow)));
}
//print $keyparam;
2012-09-30 21:26:58 +02:00
print $valtoshow;
2012-09-21 00:13:20 +02:00
$i++;
print '</td>';
}
print '</tr>';
}
}
2017-01-17 20:04:41 +01:00
print '</table>';
print '</div>';
print '<br>';
}
2012-09-30 21:26:58 +02:00
2018-07-28 14:29:28 +02:00
// End of page
2011-08-27 21:15:14 +02:00
llxFooter();
2012-08-02 10:07:55 +02:00
$db->close();
2020-04-08 11:46:45 +02:00
/**
* Return a result column with a translated result text
*
* @param string $name The name of the PHP extension
* @param string[] $activated A list with all activated PHP extensions. Deprecated.
* @param string[] $loaded A list with all loaded PHP extensions
* @param string[] $functions A list with all PHP functions to check
2020-04-12 16:26:19 +02:00
* @return string
2020-04-08 11:46:45 +02:00
*/
function getResultColumn($name, array $activated, array $loaded, array $functions)
{
global $langs;
$result = true;
2021-02-02 09:44:51 +01:00
//$result = $result && in_array(strtolower($name), $activated);
2020-04-08 11:46:45 +02:00
$result = $result && in_array(strtolower($name), $loaded);
2021-02-26 22:04:03 +01:00
foreach ($functions as $function) {
$result = $result && function_exists($function);
2020-04-08 11:46:45 +02:00
}
$html = "<td>";
2021-02-02 09:44:51 +01:00
if ($result) {
2021-02-26 22:04:03 +01:00
if (strtolower($name) == 'xdebug') {
$html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
} else {
$html .= img_picto($langs->trans("Ok"), 'tick');
}
2021-02-02 09:44:51 +01:00
if (in_array(strtolower($name), $loaded)) {
$html .= ' '.$langs->trans("Loaded").' - ';
} else {
//$html .= ' '.$langs->trans("NotLoaded").' - ';
}
if (strtolower($name) == 'xdebug') {
$html .= ' '.$langs->trans("ModuleActivated", "xdebug");
2021-03-08 11:08:58 +01:00
$html .= ' - '.$langs->trans("ModuleActivatedMayExposeInformation");
2021-02-02 09:44:51 +01:00
} else {
2021-03-08 11:08:58 +01:00
$html .= ' <span class="opacitymedium">'.$langs->trans("PHPSupport", $name).'</span>';
2021-02-02 09:44:51 +01:00
}
} else {
2021-02-26 22:04:03 +01:00
if (strtolower($name) == 'xdebug') {
$html .= yn(0).' - ';
} else {
$html .= img_warning($langs->trans("ModuleActivated", "xdebug"));
}
2021-02-02 09:44:51 +01:00
if (in_array(strtolower($name), $loaded)) {
$html .= ' '.$langs->trans("Loaded").' - ';
} else {
//$html .= ' '.$langs->trans("NotLoaded").' - ';
}
$html .= ' '.$langs->trans("ErrorPHPDoesNotSupport", $name);
}
$html .= "</td>";
2020-04-08 11:46:45 +02:00
return $html;
2020-04-08 11:46:45 +02:00
}