23 require
'../../main.inc.php';
24 require_once DOL_DOCUMENT_ROOT.
'/core/lib/memory.lib.php';
25 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/geturl.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/class/events.class.php';
31 $langs->loadLangs(array(
"install",
"other",
"admin"));
36 if (
GETPOST(
'action',
'aZ09') ==
'donothing')
50 print '<span class="opacitymedium">'.$langs->trans(
"YouMayFindSecurityAdviceHere",
'hhttps://wiki.dolibarr.org/index.php/Security_information').
'</span> (<a href="'.
$_SERVER[
"PHP_SELF"].
'">'.$langs->trans(
"Reload").
'</a>)<br>';
57 print "<strong>PHP</strong> - ".$langs->trans(
"Version").
": ".$phpversion.
"<br>\n";
60 print "<br><strong>Web server</strong> - ".$langs->trans(
"Version").
": ".
$_SERVER[
"SERVER_SOFTWARE"].
"<br>\n";
63 print "<strong>PHP safe_mode</strong> = ".(ini_get(
'safe_mode') ? ini_get(
'safe_mode') :
yn(0)).
"<br>\n";
64 print "<strong>PHP open_basedir</strong> = ".(ini_get(
'open_basedir') ? ini_get(
'open_basedir') :
yn(0)).
"<br>\n";
68 print '<strong>'.$langs->trans(
"XDebug").
'</strong>: ';
69 $test = !function_exists(
'xdebug_is_enabled');
70 if ($test)
print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NotInstalled").
' - '.$langs->trans(
"NotRiskOfLeakWithThis");
72 print img_picto(
'',
'warning').
' '.$langs->trans(
"ModuleActivatedMayExposeInformation", $langs->transnoentities(
"XDebug"));
73 print ' - '.$langs->trans(
"MoreInformation").
' <a href="'.DOL_URL_ROOT.
'/admin/system/xdebug.php">XDebug admin page</a>';
80 print '<strong>'.$langs->trans(
"dolibarr_main_prod").
'</strong>: '.$dolibarr_main_prod;
81 if (empty($dolibarr_main_prod)) {
82 print ' '.img_picto(
'',
'warning').
' '.$langs->trans(
"IfYouAreOnAProductionSetThis", 1);
86 print '<strong>'.$langs->trans(
"dolibarr_nocsrfcheck").
'</strong>: '.$dolibarr_nocsrfcheck;
87 if (!empty($dolibarr_nocsrfcheck)) {
88 print img_picto(
'',
'warning').
' '.$langs->trans(
"IfYouAreOnAProductionSetThis", 0);
92 print '<strong>'.$langs->trans(
"dolibarr_main_restrict_ip").
'</strong>: '.$dolibarr_main_restrict_ip;
102 print '<strong>'.$langs->trans(
"PermissionsOnFilesInWebRoot").
'</strong>: ';
107 print '<strong>'.$langs->trans(
"PermissionsOnFile", $conffile).
'</strong>: ';
108 $perms = fileperms($dolibarr_main_document_root.
'/'.$conffile);
110 if (($perms & 0x0004) || ($perms & 0x0002)) {
111 print img_warning().
' '.$langs->trans(
"ConfFileIsReadableOrWritableByAnyUsers");
126 print '<strong>'.$langs->trans(
"Syslog").
'</strong>: ';
127 $test = empty($conf->syslog->enabled);
128 if ($test)
print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NotInstalled").
' - '.$langs->trans(
"NotRiskOfLeakWithThis");
130 print img_picto(
'',
'warning').
' '.$langs->trans(
"ModuleActivatedMayExposeInformation", $langs->transnoentities(
"Syslog"));
136 print '<strong>'.$langs->trans(
"DebugBar").
'</strong>: ';
137 $test = empty($conf->debugbar->enabled);
138 if ($test)
print img_picto(
'',
'tick.png').
' '.$langs->trans(
"NotInstalled").
' - '.$langs->trans(
"NotRiskOfLeakWithThis");
140 print img_picto(
'',
'error').
' '.$langs->trans(
"ModuleActivatedDoNotUseInProduction", $langs->transnoentities(
"DebugBar"));
150 print '<strong>MAIN_SECURITY_HASH_ALGO</strong> = '.(empty($conf->global->MAIN_SECURITY_HASH_ALGO) ? $langs->trans(
"Undefined") :
'').
" ";
151 print '<span class="opacitymedium"> If unset: \'md5\'</span> ';
152 print
'<span class="opacitymedium"> - Recommanded value: \'password_hash\'</span><br>';
153 print
'<strong>MAIN_SECURITY_SALT</strong> = '.(empty($conf->global->MAIN_SECURITY_SALT) ? $langs->trans(
"Undefined") :
'').
'<br>';
157 print
'<strong>'.$langs->trans(
"AntivirusEnabledOnUpload").
'</strong>: ';
158 print empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ?
'' :
img_picto(
'',
'tick').
' ';
159 print
yn($conf->global->MAIN_ANTIVIRUS_COMMAND ? 1 : 0);
160 if (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) {
161 print
' - '.$conf->global->MAIN_ANTIVIRUS_COMMAND;
162 if (defined(
'MAIN_ANTIVIRUS_COMMAND')) {
163 print
' - <span class="opacitymedium">'.$langs->trans(
"ValueIsForcedBySystem").
'</span>';
170 $securityevent =
new Events($db);
171 $eventstolog = $securityevent->eventstolog;
173 print
'<strong>'.$langs->trans(
"LogEvents").
'</strong>: ';
175 foreach ($eventstolog as $key => $arr)
179 $key =
'MAIN_LOGEVENTS_'.$arr[
'id'];
180 $value = empty($conf->global->$key) ?
'' : $conf->global->$key;
181 if ($value) print $key.
', ';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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 ...
version_php()
Return PHP version.
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.