30require
'../../main.inc.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
42$langs->loadLangs(array(
"admin",
"install",
"errors"));
53llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-system_phpinfo');
63$maxphp = @ini_get(
'upload_max_filesize');
64if (preg_match(
'/k$/i', $maxphp)) {
65 $maxphp = preg_replace(
'/k$/i',
'', $maxphp);
68if (preg_match(
'/m$/i', $maxphp)) {
69 $maxphp = preg_replace(
'/m$/i',
'', $maxphp);
72if (preg_match(
'/g$/i', $maxphp)) {
73 $maxphp = preg_replace(
'/g$/i',
'', $maxphp);
74 $maxphp *= 1024 * 1024;
76if (preg_match(
'/t$/i', $maxphp)) {
77 $maxphp = preg_replace(
'/t$/i',
'', $maxphp);
78 $maxphp *= 1024 * 1024 * 1024;
80$maxphp2 = @ini_get(
'post_max_size');
81if (preg_match(
'/k$/i', $maxphp2)) {
82 $maxphp2 = preg_replace(
'/k$/i',
'', $maxphp2);
85if (preg_match(
'/m$/i', $maxphp2)) {
86 $maxphp2 = preg_replace(
'/m$/i',
'', $maxphp2);
89if (preg_match(
'/g$/i', $maxphp2)) {
90 $maxphp2 = preg_replace(
'/g$/i',
'', $maxphp2);
91 $maxphp2 *= 1024 * 1024;
93if (preg_match(
'/t$/i', $maxphp2)) {
94 $maxphp2 = preg_replace(
'/t$/i',
'', $maxphp2);
95 $maxphp2 *= 1024 * 1024 * 1024;
97if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2) {
98 $langs->load(
"errors");
99 print
info_admin($langs->trans(
"WarningParamUploadMaxFileSizeHigherThanPostMaxSize", @ini_get(
'upload_max_filesize'), @ini_get(
'post_max_size')), 0, 0,
'0',
'warning');
104print
'<table class="noborder centpercent">';
105print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td></td></tr>';
107$ErrorPicturePath =
"../../theme/eldy/img/error.png";
108$WarningPicturePath =
"../../theme/eldy/img/warning.png";
109$OkayPicturePath =
"../../theme/eldy/img/tick.png";
111print
'<tr><td>'.$langs->trans(
"Version").
'</td><td>';
113$arrayphpminversionerror = array(5, 5, 0);
114$arrayphpminversionwarning = array(5, 6, 0);
117 print
img_picto(
'Error',
'error').
' '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionerror));
119 print
img_picto(
'Warning',
'warning').
' '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionwarning));
125print
'<tr><td>GET and POST support</td><td>';
127if (!isset($_GET[
"testget"]) && !isset($_POST[
"testpost"]) && !isset($_GET[
"mainmenu"])) {
128 print
img_picto(
'Warning',
'warning').
' '.$langs->trans(
"PHPSupportPOSTGETKo");
129 print
' (<a href="'.$_SERVER[
"PHP_SELF"].
'?testget=ok">'.$langs->trans(
"Recheck").
'</a>)';
131 print
img_picto(
'Ok',
'tick').
' '.$langs->trans(
"PHPSupportPOSTGETOk");
135print
'<tr><td>Sessions support</td><td>';
136if (!function_exists(
"session_id")) {
137 print
img_picto(
'Error',
'error').
' '.$langs->trans(
"ErrorPHPDoesNotSupportSessions");
139 print
img_picto(
'Ok',
'tick').
' '.$langs->trans(
"PHPSupportSessions");
143print
'<tr><td>UTF-8 support</td><td>';
144if (!function_exists(
"utf8_encode")) {
145 print
img_picto(
'Warning',
'warning').
' '.$langs->trans(
"ErrorPHPDoesNotSupport",
"UTF8");
147 print
img_picto(
'Ok',
'tick').
' '.$langs->trans(
"PHPSupport",
"UTF8");
155$activatedExtensions = array();
156$loadedExtensions = array_map(
'strtolower', get_loaded_extensions(
false));
158print
'<table class="noborder centpercent">';
159print
'<tr class="liste_titre">';
160print
'<td class="titlefield">'.$langs->trans(
"Extension").
'</td>';
161print
'<td>'.$langs->trans(
"Test").
'</td>';
164$functions = [
"mb_check_encoding"];
168print
"<td>".$name.
"</td>";
169print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
172$functions = [
"json_decode"];
176print
"<td>".$name.
"</td>";
177print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
180$functions = [
"imagecreate"];
184print
"<td>".$name.
"</td>";
185print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
188$functions = [
"curl_init"];
192print
"<td>".$name.
"</td>";
193print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
196$functions = [
"easter_date"];
200print
"<td>".$name.
"</td>";
201print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
204$functions = [
"simplexml_load_string"];
208print
"<td>".$name.
"</td>";
209print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
212if (empty($_SERVER[
"SERVER_ADMIN"]) || $_SERVER[
"SERVER_ADMIN"] !=
'doliwamp@localhost') {
213 $functions = [
"locale_get_primary_language",
"locale_get_region"];
217 print
"<td>".$name.
"</td>";
218 print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
222$functions = [
"imap_open"];
226print
"<td>".$name.
"</td>";
227print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
234print
"<td>".$name.
"</td>";
235print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
242print
"<td>".$name.
"</td>";
243print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
252foreach ($phparray as $key => $value) {
253 print
'<div class="div-table-responsive-no-min">';
254 print
'<table class="noborder">';
255 print
'<tr class="liste_titre">';
256 print
'<td class="titlefield">'.$key.
'</td>';
257 print
'<td colspan="2"></td>';
261 foreach ($value as $keyparam => $keyvalue) {
262 if (!is_array($keyvalue)) {
263 $keytoshow = $keyparam;
264 $valtoshow = $keyvalue;
267 if (in_array($keyparam, array(
'HTTP_COOKIE',
'Cookie',
"\$_SERVER['HTTP_COOKIE']",
'Authorization'))) {
268 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
270 if (preg_match(
'/'.preg_quote(
'$_COOKIE[\'DOLSESSID_',
'/').
'/i', $keyparam)) {
271 $keytoshow = $keyparam;
272 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
274 if (preg_match(
'/'.preg_quote(
'$_SERVER[\'PHP_AUTH_PW',
'/').
'/i', $keyparam)) {
275 $keytoshow = $keyparam;
276 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
279 print
'<tr class="oddeven">';
280 print
'<td>'.$keytoshow.
'</td>';
281 if ($keyparam ==
'X-ChromePhp-Data') {
284 print
'<td colspan="2" class="wordbreak">';
285 if ($keyparam ==
'Path') {
286 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
288 if ($keyparam ==
'PATH') {
289 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
291 if ($keyparam ==
'_SERVER["PATH"]') {
292 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
298 print
'<tr class="oddeven">';
299 print
'<td class="wordbreak">'.$keyparam.
'</td>';
301 foreach ($keyvalue as $keyparam2 => $keyvalue2) {
303 $valtoshow = $keyvalue2;
304 if ($keyparam ==
'disable_functions') {
305 $valtoshow = implode(
', ', explode(
',', trim($valtoshow)));
341 $result = $result && in_array(strtolower($name), $loaded);
343 foreach ($functions as $function) {
344 $result = $result && function_exists($function);
349 if (strtolower($name) ==
'xdebug') {
350 $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
352 $html .=
img_picto($langs->trans(
"Ok"),
'tick');
354 if (in_array(strtolower($name), $loaded)) {
355 $html .=
' '.$langs->trans(
"Loaded").
' - ';
359 if (strtolower($name) ==
'xdebug') {
360 $html .=
' '.$langs->trans(
"ModuleActivated",
"xdebug");
361 $html .=
' - '.$langs->trans(
"ModuleActivatedMayExposeInformation");
363 $html .=
' <span class="opacitymedium">'.$langs->trans(
"PHPSupport", $name).
'</span>';
366 if (strtolower($name) ==
'xdebug') {
367 $html .=
yn(0).
' - ';
369 $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
371 if (in_array(strtolower($name), $loaded)) {
372 $html .=
' '.$langs->trans(
"Loaded").
' - ';
376 $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($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
yn($yesno, $format=1, $color=0)
Return yes or no in current language.
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.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.