From adb49e8046c2b60803e4c8e8b614767a0ae2b7eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Dec 2005 00:23:02 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Meilleur=20gestion=20du=20chemin=20propo?= =?UTF-8?q?s=E9=20par=20d=E9faut=20=E0=20l'install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/install/etape1.php | 6 +++--- htdocs/install/fileconf.php | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) 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"];