28require
'../../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
32$langs->loadLangs(array(
"admin",
"install",
"errors"));
53$maxphp = @ini_get(
'upload_max_filesize');
54if (preg_match(
'/k$/i', $maxphp)) {
55 $maxphp = preg_replace(
'/k$/i',
'', $maxphp);
56 $maxphp = $maxphp * 1;
58if (preg_match(
'/m$/i', $maxphp)) {
59 $maxphp = preg_replace(
'/m$/i',
'', $maxphp);
60 $maxphp = $maxphp * 1024;
62if (preg_match(
'/g$/i', $maxphp)) {
63 $maxphp = preg_replace(
'/g$/i',
'', $maxphp);
64 $maxphp = $maxphp * 1024 * 1024;
66if (preg_match(
'/t$/i', $maxphp)) {
67 $maxphp = preg_replace(
'/t$/i',
'', $maxphp);
68 $maxphp = $maxphp * 1024 * 1024 * 1024;
70$maxphp2 = @ini_get(
'post_max_size');
71if (preg_match(
'/k$/i', $maxphp2)) {
72 $maxphp2 = preg_replace(
'/k$/i',
'', $maxphp2);
73 $maxphp2 = $maxphp2 * 1;
75if (preg_match(
'/m$/i', $maxphp2)) {
76 $maxphp2 = preg_replace(
'/m$/i',
'', $maxphp2);
77 $maxphp2 = $maxphp2 * 1024;
79if (preg_match(
'/g$/i', $maxphp2)) {
80 $maxphp2 = preg_replace(
'/g$/i',
'', $maxphp2);
81 $maxphp2 = $maxphp2 * 1024 * 1024;
83if (preg_match(
'/t$/i', $maxphp2)) {
84 $maxphp2 = preg_replace(
'/t$/i',
'', $maxphp2);
85 $maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
87if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2) {
88 $langs->load(
"errors");
89 print
info_admin($langs->trans(
"WarningParamUploadMaxFileSizeHigherThanPostMaxSize", @ini_get(
'upload_max_filesize'), @ini_get(
'post_max_size')), 0, 0, 0,
'warning');
94print
'<table class="noborder centpercent">';
95print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
97$ErrorPicturePath =
"../../theme/eldy/img/error.png";
98$WarningPicturePath =
"../../theme/eldy/img/warning.png";
99$OkayPicturePath =
"../../theme/eldy/img/tick.png";
101print
'<tr><td>'.$langs->trans(
"Version").
'</td><td>';
103$arrayphpminversionerror = array(5, 5, 0);
104$arrayphpminversionwarning = array(5, 6, 0);
107 print
'<img src="'.$ErrorPicturePath.
'" alt="Error"> '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionerror));
109 print
'<img src="'.$WarningPicturePath.
'" alt="Warning"> '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionwarning));
115print
'<tr><td>GET and POST support</td><td>';
117if (!isset($_GET[
"testget"]) && !isset($_POST[
"testpost"]) && !isset($_GET[
"mainmenu"])) {
118 print
'<img src="'.$WarningPicturePath.
'" alt="Warning"> '.$langs->trans(
"PHPSupportPOSTGETKo");
119 print
' (<a href="'.$_SERVER[
"PHP_SELF"].
'?testget=ok">'.$langs->trans(
"Recheck").
'</a>)';
121 print
'<img src="'.$OkayPicturePath.
'" alt="Ok"> '.$langs->trans(
"PHPSupportPOSTGETOk");
125print
'<tr><td>Sessions support</td><td>';
126if (!function_exists(
"session_id")) {
127 print
'<img src="'.$ErrorPicturePath.
'" alt="Error"> '.$langs->trans(
"ErrorPHPDoesNotSupportSessions");
129 print
'<img src="'.$OkayPicturePath.
'" alt="Ok"> '.$langs->trans(
"PHPSupportSessions");
133print
'<tr><td>UTF-8 support</td><td>';
134if (!function_exists(
"utf8_encode")) {
135 print
'<img src="'.$WarningPicturePath.
'" alt="Warning"> '.$langs->trans(
"ErrorPHPDoesNotSupport",
"UTF8");
137 print
'<img src="'.$OkayPicturePath.
'" alt="Ok"> '.$langs->trans(
"PHPSupport",
"UTF8");
145$activatedExtensions = array();
146$loadedExtensions = array_map(
'strtolower', get_loaded_extensions(
false));
148print
'<table class="noborder centpercent">';
149print
'<tr class="liste_titre">';
150print
'<td class="titlefield">'.$langs->trans(
"Extension").
'</td>';
151print
'<td>'.$langs->trans(
"Test").
'</td>';
154$functions = [
"mb_check_encoding"];
158print
"<td>".$name.
"</td>";
159print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
162$functions = [
"json_decode"];
166print
"<td>".$name.
"</td>";
167print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
170$functions = [
"imagecreate"];
174print
"<td>".$name.
"</td>";
175print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
178$functions = [
"curl_init"];
182print
"<td>".$name.
"</td>";
183print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
186$functions = [
"easter_date"];
190print
"<td>".$name.
"</td>";
191print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
194$functions = [
"simplexml_load_string"];
198print
"<td>".$name.
"</td>";
199print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
202if (empty($_SERVER[
"SERVER_ADMIN"]) || $_SERVER[
"SERVER_ADMIN"] !=
'doliwamp@localhost') {
203 $functions = [
"locale_get_primary_language",
"locale_get_region"];
207 print
"<td>".$name.
"</td>";
208 print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
212$functions = [
"imap_open"];
216print
"<td>".$name.
"</td>";
217print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
224print
"<td>".$name.
"</td>";
225print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
232print
"<td>".$name.
"</td>";
233print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
242foreach ($phparray as $key => $value) {
243 print
'<div class="div-table-responsive-no-min">';
244 print
'<table class="noborder">';
245 print
'<tr class="liste_titre">';
246 print
'<td class="titlefield">'.$key.
'</td>';
247 print
'<td colspan="2">'.$langs->trans(
"Value").
'</td>';
251 foreach ($value as $keyparam => $keyvalue) {
252 if (!is_array($keyvalue)) {
253 $keytoshow = $keyparam;
254 $valtoshow = $keyvalue;
257 if (in_array($keyparam, array(
'HTTP_COOKIE',
'Cookie',
"\$_SERVER['HTTP_COOKIE']",
'Authorization'))) {
258 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
260 if (preg_match(
'/'.preg_quote(
'$_COOKIE[\'DOLSESSID_',
'/').
'/i', $keyparam)) {
261 $keytoshow = $keyparam;
262 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
264 if (preg_match(
'/'.preg_quote(
'$_SERVER[\'PHP_AUTH_PW',
'/').
'/i', $keyparam)) {
265 $keytoshow = $keyparam;
266 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
269 print
'<tr class="oddeven">';
270 print
'<td>'.$keytoshow.
'</td>';
271 if ($keyparam ==
'X-ChromePhp-Data') {
274 print
'<td colspan="2" class="wordbreak">';
275 if ($keyparam ==
'Path') {
276 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
278 if ($keyparam ==
'PATH') {
279 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
281 if ($keyparam ==
'_SERVER["PATH"]') {
282 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
288 print
'<tr class="oddeven">';
289 print
'<td class="wordbreak">'.$keyparam.
'</td>';
291 foreach ($keyvalue as $keyparam2 => $keyvalue2) {
293 $valtoshow = $keyvalue2;
294 if ($keyparam ==
'disable_functions') {
295 $valtoshow = implode(
', ', explode(
',', trim($valtoshow)));
331 $result = $result && in_array(strtolower($name), $loaded);
333 foreach ($functions as $function) {
334 $result = $result && function_exists($function);
339 if (strtolower($name) ==
'xdebug') {
340 $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
342 $html .=
img_picto($langs->trans(
"Ok"),
'tick');
344 if (in_array(strtolower($name), $loaded)) {
345 $html .=
' '.$langs->trans(
"Loaded").
' - ';
349 if (strtolower($name) ==
'xdebug') {
350 $html .=
' '.$langs->trans(
"ModuleActivated",
"xdebug");
351 $html .=
' - '.$langs->trans(
"ModuleActivatedMayExposeInformation");
353 $html .=
' <span class="opacitymedium">'.$langs->trans(
"PHPSupport", $name).
'</span>';
356 if (strtolower($name) ==
'xdebug') {
357 $html .=
yn(0).
' - ';
359 $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
361 if (in_array(strtolower($name), $loaded)) {
362 $html .=
' '.$langs->trans(
"Loaded").
' - ';
366 $html .=
' '.$langs->trans(
"ErrorPHPDoesNotSupport", $name);
getResultColumn($name, array $activated, array $loaded, array $functions)
Return a result column with a translated result text.
versiontostring($versionarray)
Renvoi une version en chaine depuis une version en tableau.
versionphparray()
Return version PHP.
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays).
phpinfo_array()
Return the php_info into an array.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
dol_trunc($string, $size=40, $trunc='right', $stringencoding='UTF-8', $nodot=0, $display=0)
Truncate a string to a particular length adding '…' if string larger than length.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.