29require
'../../main.inc.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
33$langs->loadLangs(array(
"admin",
"install",
"errors"));
44llxHeader(
'',
'',
'',
'', 0, 0,
'',
'',
'',
'mod-admin page-system_phpinfo');
54$maxphp = @ini_get(
'upload_max_filesize');
55if (preg_match(
'/k$/i', $maxphp)) {
56 $maxphp = preg_replace(
'/k$/i',
'', $maxphp);
59if (preg_match(
'/m$/i', $maxphp)) {
60 $maxphp = preg_replace(
'/m$/i',
'', $maxphp);
63if (preg_match(
'/g$/i', $maxphp)) {
64 $maxphp = preg_replace(
'/g$/i',
'', $maxphp);
65 $maxphp *= 1024 * 1024;
67if (preg_match(
'/t$/i', $maxphp)) {
68 $maxphp = preg_replace(
'/t$/i',
'', $maxphp);
69 $maxphp *= 1024 * 1024 * 1024;
71$maxphp2 = @ini_get(
'post_max_size');
72if (preg_match(
'/k$/i', $maxphp2)) {
73 $maxphp2 = preg_replace(
'/k$/i',
'', $maxphp2);
76if (preg_match(
'/m$/i', $maxphp2)) {
77 $maxphp2 = preg_replace(
'/m$/i',
'', $maxphp2);
80if (preg_match(
'/g$/i', $maxphp2)) {
81 $maxphp2 = preg_replace(
'/g$/i',
'', $maxphp2);
82 $maxphp2 *= 1024 * 1024;
84if (preg_match(
'/t$/i', $maxphp2)) {
85 $maxphp2 = preg_replace(
'/t$/i',
'', $maxphp2);
86 $maxphp2 *= 1024 * 1024 * 1024;
88if ($maxphp > 0 && $maxphp2 > 0 && $maxphp > $maxphp2) {
89 $langs->load(
"errors");
90 print
info_admin($langs->trans(
"WarningParamUploadMaxFileSizeHigherThanPostMaxSize", @ini_get(
'upload_max_filesize'), @ini_get(
'post_max_size')), 0, 0, 0,
'warning');
95print
'<table class="noborder centpercent">';
96print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
98$ErrorPicturePath =
"../../theme/eldy/img/error.png";
99$WarningPicturePath =
"../../theme/eldy/img/warning.png";
100$OkayPicturePath =
"../../theme/eldy/img/tick.png";
102print
'<tr><td>'.$langs->trans(
"Version").
'</td><td>';
104$arrayphpminversionerror = array(5, 5, 0);
105$arrayphpminversionwarning = array(5, 6, 0);
108 print
img_picto(
'Error',
'error').
' '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionerror));
110 print
img_picto(
'Warning',
'warning').
' '.$langs->trans(
"ErrorPHPVersionTooLow",
versiontostring($arrayphpminversionwarning));
116print
'<tr><td>GET and POST support</td><td>';
118if (!isset($_GET[
"testget"]) && !isset($_POST[
"testpost"]) && !isset($_GET[
"mainmenu"])) {
119 print
img_picto(
'Warning',
'warning').
' '.$langs->trans(
"PHPSupportPOSTGETKo");
120 print
' (<a href="'.$_SERVER[
"PHP_SELF"].
'?testget=ok">'.$langs->trans(
"Recheck").
'</a>)';
122 print
img_picto(
'Ok',
'tick').
' '.$langs->trans(
"PHPSupportPOSTGETOk");
126print
'<tr><td>Sessions support</td><td>';
127if (!function_exists(
"session_id")) {
128 print
img_picto(
'Error',
'error').
' '.$langs->trans(
"ErrorPHPDoesNotSupportSessions");
130 print
img_picto(
'Ok',
'tick').
' '.$langs->trans(
"PHPSupportSessions");
134print
'<tr><td>UTF-8 support</td><td>';
135if (!function_exists(
"utf8_encode")) {
136 print
img_picto(
'Warning',
'warning').
' '.$langs->trans(
"ErrorPHPDoesNotSupport",
"UTF8");
138 print
img_picto(
'Ok',
'tick').
' '.$langs->trans(
"PHPSupport",
"UTF8");
146$activatedExtensions = array();
147$loadedExtensions = array_map(
'strtolower', get_loaded_extensions(
false));
149print
'<table class="noborder centpercent">';
150print
'<tr class="liste_titre">';
151print
'<td class="titlefield">'.$langs->trans(
"Extension").
'</td>';
152print
'<td>'.$langs->trans(
"Test").
'</td>';
155$functions = [
"mb_check_encoding"];
159print
"<td>".$name.
"</td>";
160print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
163$functions = [
"json_decode"];
167print
"<td>".$name.
"</td>";
168print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
171$functions = [
"imagecreate"];
175print
"<td>".$name.
"</td>";
176print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
179$functions = [
"curl_init"];
183print
"<td>".$name.
"</td>";
184print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
187$functions = [
"easter_date"];
191print
"<td>".$name.
"</td>";
192print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
195$functions = [
"simplexml_load_string"];
199print
"<td>".$name.
"</td>";
200print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
203if (empty($_SERVER[
"SERVER_ADMIN"]) || $_SERVER[
"SERVER_ADMIN"] !=
'doliwamp@localhost') {
204 $functions = [
"locale_get_primary_language",
"locale_get_region"];
208 print
"<td>".$name.
"</td>";
209 print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
213$functions = [
"imap_open"];
217print
"<td>".$name.
"</td>";
218print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
225print
"<td>".$name.
"</td>";
226print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
233print
"<td>".$name.
"</td>";
234print
getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions);
243foreach ($phparray as $key => $value) {
244 print
'<div class="div-table-responsive-no-min">';
245 print
'<table class="noborder">';
246 print
'<tr class="liste_titre">';
247 print
'<td class="titlefield">'.$key.
'</td>';
248 print
'<td colspan="2">'.$langs->trans(
"Value").
'</td>';
252 foreach ($value as $keyparam => $keyvalue) {
253 if (!is_array($keyvalue)) {
254 $keytoshow = $keyparam;
255 $valtoshow = $keyvalue;
258 if (in_array($keyparam, array(
'HTTP_COOKIE',
'Cookie',
"\$_SERVER['HTTP_COOKIE']",
'Authorization'))) {
259 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
261 if (preg_match(
'/'.preg_quote(
'$_COOKIE[\'DOLSESSID_',
'/').
'/i', $keyparam)) {
262 $keytoshow = $keyparam;
263 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
265 if (preg_match(
'/'.preg_quote(
'$_SERVER[\'PHP_AUTH_PW',
'/').
'/i', $keyparam)) {
266 $keytoshow = $keyparam;
267 $valtoshow =
'<span class="opacitymedium">'.$langs->trans(
"Hidden").
'</span>';
270 print
'<tr class="oddeven">';
271 print
'<td>'.$keytoshow.
'</td>';
272 if ($keyparam ==
'X-ChromePhp-Data') {
275 print
'<td colspan="2" class="wordbreak">';
276 if ($keyparam ==
'Path') {
277 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
279 if ($keyparam ==
'PATH') {
280 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
282 if ($keyparam ==
'_SERVER["PATH"]') {
283 $valtoshow = implode(
'; ', explode(
';', trim($valtoshow)));
289 print
'<tr class="oddeven">';
290 print
'<td class="wordbreak">'.$keyparam.
'</td>';
292 foreach ($keyvalue as $keyparam2 => $keyvalue2) {
294 $valtoshow = $keyvalue2;
295 if ($keyparam ==
'disable_functions') {
296 $valtoshow = implode(
', ', explode(
',', trim($valtoshow)));
332 $result = $result && in_array(strtolower($name), $loaded);
334 foreach ($functions as $function) {
335 $result = $result && function_exists($function);
340 if (strtolower($name) ==
'xdebug') {
341 $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
343 $html .=
img_picto($langs->trans(
"Ok"),
'tick');
345 if (in_array(strtolower($name), $loaded)) {
346 $html .=
' '.$langs->trans(
"Loaded").
' - ';
350 if (strtolower($name) ==
'xdebug') {
351 $html .=
' '.$langs->trans(
"ModuleActivated",
"xdebug");
352 $html .=
' - '.$langs->trans(
"ModuleActivatedMayExposeInformation");
354 $html .=
' <span class="opacitymedium">'.$langs->trans(
"PHPSupport", $name).
'</span>';
357 if (strtolower($name) ==
'xdebug') {
358 $html .=
yn(0).
' - ';
360 $html .=
img_warning($langs->trans(
"ModuleActivated",
"xdebug"));
362 if (in_array(strtolower($name), $loaded)) {
363 $html .=
' '.$langs->trans(
"Loaded").
' - ';
367 $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($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, $case=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.