diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 3e675ba19bb..2222da4b25f 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -107,6 +107,25 @@ else */ } + +// Check memory +$memrequired=16*1024*1024; +$memmax=ini_get("memory_limit"); +eregi('([0-9]+)([a-zA-Z]*)',$memmax,$reg); +if ($reg[2]) +{ + if (strtoupper($reg[2]) == 'M') $memmax=$reg[1]*1024*1024; + if (strtoupper($reg[2]) == 'K') $memmax=$reg[1]*1024; +} +if ($memmax >= $memrequired) +{ + print 'Ok '.$langs->trans("PHPMemoryOK",$memmax,$memrequired)."
\n"; +} +else +{ + print 'Warning '.$langs->trans("PHPMemoryTooLow",$memmax,$memrequired)."
\n"; +} + // Si fichier présent et lisible et renseigné clearstatcache(); if (is_readable($conffile) && filesize($conffile) > 8) diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index 79b22507778..e8f3d1467e3 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -12,6 +12,8 @@ ConfFileIsWritable=Configuration file %s is writable. PHPSupportSessions=This PHP supports sessions. PHPSupportPOSTGETOk=This PHP supports variables POST and GET. PHPSupportPOSTGETKo=It's possible this PHP does not support variables POST and/or GET. Check your parameter variables_order in php.ini. +PHPMemoryOK=Your PHP max session memory is set to %s. This should be enough. +PHPMemoryTooLow=Your PHP max session memory is set to %s bytes. This should be too low. Change your php.ini to set memory_limit parameter to at least %s bytes. Recheck=Click here for a more significative test ErrorPHPDoesNotSupportSessions=Your PHP installation does not support sessions. This feature is required to make Dolibarr working. Check your PHP setup. ErrorDirDoesNotExists=Directory %s does not exists. diff --git a/htdocs/langs/fr_FR/install.lang b/htdocs/langs/fr_FR/install.lang index 63ee43ced6e..515ef2f1799 100644 --- a/htdocs/langs/fr_FR/install.lang +++ b/htdocs/langs/fr_FR/install.lang @@ -12,6 +12,8 @@ ConfFileIsWritable=Le fichier %s est modifiable. PHPSupportSessions=Ce PHP supporte les sessions. PHPSupportPOSTGETOk=Ce PHP supporte bien les variables POST et GET. PHPSupportPOSTGETKo=Il est possible que ce PHP ne supporte pas les variables POST et/ou GET. Vérifier le paramètre variables_order du php.ini. +PHPMemoryOK=Votre mémoire maximum de session PHP est défini à %s. Ceci devrait être suffisant. +PHPMemoryTooLow=Votre mémoire maximum de session PHP est défini à %s octets. Ceci est trop faible. Il est recommandé de modifier le paramètre memory_limit de votre fichier php.ini à au moins %s octets. Recheck=Cliquez ici pour un test plus probant ErrorPHPDoesNotSupportSessions=Votre installation PHP ne supporte pas les sessions. Cette fonctionnalité est requise pour faire fonctionner Dolibarr. Vérifiez votre configuration de PHP. ErrorDirDoesNotExists=Le répertoire %s n'existe pas ou n'est pas accessible.