diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php
index 5e626247aee..634b1c60886 100644
--- a/htdocs/install/etape1.php
+++ b/htdocs/install/etape1.php
@@ -80,11 +80,11 @@ if ($_POST["action"] == "set")
{
if (! is_dir($main_dir))
{
- dolibarr_syslog ("Le dossier '".$main_dir."' n'existe pas");
+ dolibarr_syslog ("Repertoire '".$main_dir."' inexistant ou non accessible");
print "
";
- print $langs->trans("ErrorDirDoesNotExists",$main_dir).' ';;
- print "Vous avez saisie une mauvaise valeur pour le paramètre '".$langs->trans("WebPagesDirectory")."'. ";
+ print $langs->trans("ErrorDirDoesNotExists",$main_dir).' ';
+ print $langs->trans("ErrorWrongValueForParameter",$langs->trans("WebPagesDirectory")).' ';
print $langs->trans("ErrorGoBackAndCorrectParameters").'
';
print ' | ';
print $langs->trans("Error");
diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php
index 846d05aa5de..1a82cb4c4c8 100644
--- a/htdocs/install/fileconf.php
+++ b/htdocs/install/fileconf.php
@@ -54,9 +54,11 @@ print " | ";
if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0)
{
+ //print "x".$_SERVER["SCRIPT_FILENAME"]." y".$_SERVER["DOCUMENT_ROOT"];
+
// Si le php fonctionne en CGI, alors SCRIPT_FILENAME vaut le path du php et
// ce n'est pas ce qu'on veut. Dans ce cas, on propose $_SERVER["DOCUMENT_ROOT"]
- if (eregi('php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('php\.exe$',$_SERVER["SCRIPT_FILENAME"]))
+ if (eregi('^php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('[\\\/]php$',$_SERVER["SCRIPT_FILENAME"]) || eregi('php\.exe$',$_SERVER["SCRIPT_FILENAME"]))
{
$dolibarr_main_document_root=$_SERVER["DOCUMENT_ROOT"];