27 require
'../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
31 $langs->loadLangs(array(
"admin",
"install",
"errors"));
53 $maxphp = @ini_get(
'upload_max_filesize');
54 if (preg_match(
'/k$/i', $maxphp)) $maxphp = $maxphp * 1;
55 if (preg_match(
'/m$/i', $maxphp)) $maxphp = $maxphp * 1024;
56 if (preg_match(
'/g$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024;
57 if (preg_match(
'/t$/i', $maxphp)) $maxphp = $maxphp * 1024 * 1024 * 1024;
58 $maxphp2 = @ini_get(
'post_max_size');
59 if (preg_match(
'/k$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1;
60 if (preg_match(
'/m$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024;
61 if (preg_match(
'/g$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024;
62 if (preg_match(
'/t$/i', $maxphp2)) $maxphp2 = $maxphp2 * 1024 * 1024 * 1024;
63 if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2)
65 $langs->load(
"errors");
66 print info_admin($langs->trans(
"WarningParamUploadMaxFileSizeHigherThanPostMaxSize", @ini_get(
'upload_max_filesize'), @ini_get(
'post_max_size')), 0, 0, 0,
'warning');
71 print '<table class="noborder centpercent">';
72 print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
74 $ErrorPicturePath =
"../../theme/eldy/img/error.png";
75 $WarningPicturePath =
"../../theme/eldy/img/warning.png";
76 $OkayPicturePath =
"../../theme/eldy/img/tick.png";
78 print '<tr><td>'.$langs->trans(
"Version").
'</td><td>';
80 $arrayphpminversionerror = array(5, 5, 0);
81 $arrayphpminversionwarning = array(5, 6, 0);
85 print '<img src="'.$ErrorPicturePath.
'" alt="Error"> '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionerror));
88 print '<img src="'.$WarningPicturePath.
'" alt="Warning"> '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionwarning));
94 print '<tr><td>GET and POST support</td><td>';
96 if (!isset($_GET[
"testget"]) && !isset($_POST[
"testpost"]) && !isset($_GET[
"mainmenu"]))
98 print '<img src="'.$WarningPicturePath.
'" alt="Warning"> '.$langs->trans(
"PHPSupportPOSTGETKo");
99 print ' (<a href="'.$_SERVER[
"PHP_SELF"].
'?testget=ok">'.$langs->trans(
"Recheck").
'</a>)';
101 print '<img src="'.$OkayPicturePath.
'" alt="Ok"> '.$langs->trans(
"PHPSupportPOSTGETOk");
105 print '<tr><td>Sessions support</td><td>';
106 if (!function_exists(
"session_id"))
108 print '<img src="'.$ErrorPicturePath.
'" alt="Error"> '.$langs->trans(
"ErrorPHPDoesNotSupportSessions");
110 print '<img src="'.$OkayPicturePath.
'" alt="Ok"> '.$langs->trans(
"PHPSupportSessions");
114 print '<tr><td>UTF-8 support</td><td>';
115 if (!function_exists(
"utf8_encode"))
117 print '<img src="'.$WarningPicturePath.
'" alt="Warning"> '.$langs->trans(
"ErrorPHPDoesNotSupport",
"UTF8");
119 print '<img src="'.$OkayPicturePath.
'" alt="Ok"> '.$langs->trans(
"PHPSupport",
"UTF8");
127 $activatedExtensions = array();
128 $loadedExtensions = array_map(
'strtolower', get_loaded_extensions(
false));
130 print '<table class="noborder centpercent">';
131 print '<tr class="liste_titre">';
132 print '<td class="titlefield">'.$langs->trans(
"Extension").
'</td>';
133 print '<td>'.$langs->trans(
"Test").
'</td>';
136 $functions = [
"mb_check_encoding"];
140 print "<td>".$name.
"</td>";
144 $functions = [
"json_decode"];
148 print "<td>".$name.
"</td>";
152 $functions = [
"imagecreate"];
156 print "<td>".$name.
"</td>";
160 $functions = [
"curl_init"];
164 print "<td>".$name.
"</td>";
168 if (empty(
$_SERVER[
"SERVER_ADMIN"]) ||
$_SERVER[
"SERVER_ADMIN"] !=
'doliwamp@localhost')
170 $functions = [
"locale_get_primary_language",
"locale_get_region"];
174 print "<td>".$name.
"</td>";
179 $functions = [
"imap_open"];
183 print "<td>".$name.
"</td>";
187 $functions = array();
191 print "<td>".$name.
"</td>";
201 foreach ($phparray as $key => $value)
203 print '<div class="div-table-responsive-no-min">';
204 print '<table class="noborder">';
205 print '<tr class="liste_titre">';
206 print '<td class="titlefield">'.$key.
'</td>';
207 print '<td colspan="2">'.$langs->trans(
"Value").
'</td>';
211 foreach ($value as $keyparam => $keyvalue)
213 if (!is_array($keyvalue))
215 print '<tr class="oddeven">';
216 print '<td>'.$keyparam.
'</td>';
217 $valtoshow = $keyvalue;
218 if ($keyparam ==
'X-ChromePhp-Data') $valtoshow =
dol_trunc($keyvalue, 80);
219 print '<td colspan="2" class="wordbreak">';
220 if ($keyparam ==
'Path') $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
221 if ($keyparam ==
'PATH') $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
222 if ($keyparam ==
'_SERVER["PATH"]') $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
227 print '<tr class="oddeven">';
228 print '<td class="wordbreak">'.$keyparam.
'</td>';
230 foreach ($keyvalue as $keyparam2 => $keyvalue2)
233 $valtoshow = $keyvalue2;
234 if ($keyparam ==
'disable_functions') $valtoshow = implode(
', ', explode(
',', trim($valtoshow)));
269 $result = $result && in_array(strtolower($name), $loaded);
271 foreach ($functions as $function)
273 $result = $result && function_exists($function);
278 if (strtolower($name) ==
'xdebug') $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
279 else $html .=
img_picto($langs->trans(
"Ok"),
'tick');
280 if (in_array(strtolower($name), $loaded)) {
281 $html .=
' '.$langs->trans(
"Loaded").
' - ';
285 if (strtolower($name) ==
'xdebug') {
286 $html .=
' '.$langs->trans(
"ModuleActivated",
"xdebug");
288 $html .=
' '.$langs->trans(
"PHPSupport", $name);
291 if (strtolower($name) ==
'xdebug') $html .=
yn(0).
' - ';
292 else $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
293 if (in_array(strtolower($name), $loaded)) {
294 $html .=
' '.$langs->trans(
"Loaded").
' - ';
298 $html .=
' '.$langs->trans(
"ErrorPHPDoesNotSupport", $name);
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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.
img_warning($titlealt= 'default', $moreatt= '', $morecss= 'pictowarning')
Show warning logo.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays).
phpinfo_array()
Return the php_info into an array.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
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.
versionphparray()
Return version PHP.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin= '1', $morecss= '', $textfordropdown= '')
Show information for admin users or standard users.