diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 6d985bbe37c..bf7c59cbd13 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2007 Rodolphe Quiedeville * Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2004 Sebastien Di Cintio @@ -23,9 +23,9 @@ */ /** - \file htdocs/install/etape1.php - \brief Génère le fichier conf.php avec les informations issues de l'étape précédente - \version $Revision$ + \file htdocs/install/etape1.php + \brief Génère le fichier conf.php avec les informations issues de l'étape précédente + \version $Revision$ */ include_once("./inc.php"); @@ -36,521 +36,520 @@ $langs->setDefaultLang($setuplang); $langs->load("admin"); $langs->load("install"); - pHeader($langs->trans("ConfigurationFile"),"etape2"); - $error = 0; - // Répertoire des pages dolibarr $main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):''; // On supprime / de fin dans main_dir if (substr($main_dir, strlen($main_dir) -1) == "/") { - $main_dir = substr($main_dir, 0, strlen($main_dir)-1); + $main_dir = substr($main_dir, 0, strlen($main_dir)-1); } // On supprime / de fin dans main_url if (substr($_POST["main_url"], strlen($_POST["main_url"]) -1) == "/") { - $_POST["main_url"] = substr($_POST["main_url"], 0, strlen($_POST["main_url"])-1); + $_POST["main_url"] = substr($_POST["main_url"], 0, strlen($_POST["main_url"])-1); } // Répertoire des documents générés (factures, etc...) $main_data_dir=isset($_POST["main_data_dir"])?$_POST["main_data_dir"]:''; if (! $main_data_dir) { $main_data_dir="$main_dir/documents"; } - - /* * Actions */ if ($_POST["action"] == "set") { - umask(0); - - print '

'.$langs->trans("SaveConfigurationFile").'

'; - - print ''; - - // Verification validite parametre main_dir - if (! $error) + umask(0); + print '

'.$langs->trans("SaveConfigurationFile").'

'; + print '
'; + + // Verification validite parametre main_dir + if (! $error) { - if (! is_dir($main_dir)) + if (! is_dir($main_dir)) { - dolibarr_syslog ("Repertoire '".$main_dir."' inexistant ou non accessible"); - - print ""; - $error++; + dolibarr_syslog ("Repertoire '".$main_dir."' inexistant ou non accessible"); + + print ""; + $error++; } } - - // Sauvegarde fichier configuration - if (! $error) + + // Sauvegarde fichier configuration + if (! $error) { - $fp = fopen("$conffile", "w"); - - if($fp) + $fp = fopen("$conffile", "w"); + + if($fp) { - clearstatcache(); - - fwrite($fp, ''); - fclose($fp); - - if (file_exists("$conffile")) + clearstatcache(); + + fputs($fp, ' Rodo + fputs($fp, '$dolibarr_smarty_compile="'.$_POST["smarty_compile"].'";'); + fputs($fp,"\n"); + + fputs($fp, '$dolibarr_smarty_cache="'.$_POST["smarty_cache"].'";'); + fputs($fp,"\n"); + */ + + fputs($fp, '?>'); + fclose($fp); + + if (file_exists("$conffile")) { - include("$conffile"); // On force rechargement. Ne pas mettre include_once ! - print ""; + include("$conffile"); // On force rechargement. Ne pas mettre include_once ! + print ""; } - else + else { - $error++; + $error++; } } - - if($dolibarr_main_db_type == "mysql") + + if($dolibarr_main_db_type == "mysql") { - $choix=1; + $choix=1; } - else + else { - $choix=2; + $choix=2; } - - // Chargement driver acces bases - require_once($dolibarr_main_document_root."/lib/databases/".$dolibarr_main_db_type.".lib.php"); - + + // Chargement driver acces bases + require_once($dolibarr_main_document_root."/lib/databases/".$dolibarr_main_db_type.".lib.php"); + } - - /*************************************************************************** - * - * Creation des répertoires - * - ***************************************************************************/ - - // Creation des sous-répertoires main_data_dir - if (! $error) + + /*************************************************************************** + * + * Creation des répertoires + * + ***************************************************************************/ + + // Creation des sous-répertoires main_data_dir + if (! $error) { - dolibarr_syslog ("Le dossier '".$main_dir."' existe"); - - // Répertoire des documents - if (! is_dir($main_data_dir)) + dolibarr_syslog ("Le dossier '".$main_dir."' existe"); + + // Répertoire des documents + if (! is_dir($main_data_dir)) { - create_exdir($main_data_dir); + create_exdir($main_data_dir); } - - if (! is_dir($main_data_dir)) + + if (! is_dir($main_data_dir)) { - print ""; - $error++; + print ""; + $error++; } - else + else { - // Les documents sont en dehors de htdocs car ne doivent pas pouvoir etre téléchargés en passant outre l'authentification - $dir[0] = "$main_data_dir/facture"; - $dir[1] = "$main_data_dir/users"; - $dir[2] = "$main_data_dir/propale"; - $dir[3] = "$main_data_dir/societe"; - $dir[4] = "$main_data_dir/ficheinter"; - $dir[5] = "$main_data_dir/produit"; - $dir[6] = "$main_data_dir/rapport"; - $dir[7] = "$main_data_dir/rss"; - $dir[8] = "$main_data_dir/logo"; - - // Boucle sur chaque répertoire de dir[] pour les créer s'ils nexistent pas - for ($i = 0 ; $i < sizeof($dir) ; $i++) + // Les documents sont en dehors de htdocs car ne doivent pas pouvoir etre téléchargés en passant outre l'authentification + $dir[0] = "$main_data_dir/facture"; + $dir[1] = "$main_data_dir/users"; + $dir[2] = "$main_data_dir/propale"; + $dir[3] = "$main_data_dir/societe"; + $dir[4] = "$main_data_dir/ficheinter"; + $dir[5] = "$main_data_dir/produit"; + $dir[6] = "$main_data_dir/rapport"; + $dir[7] = "$main_data_dir/rss"; + $dir[8] = "$main_data_dir/logo"; + + // Boucle sur chaque répertoire de dir[] pour les créer s'ils nexistent pas + for ($i = 0 ; $i < sizeof($dir) ; $i++) { - if (is_dir($dir[$i])) + if (is_dir($dir[$i])) { - dolibarr_syslog ("Directory '".$dir[$i]."' exists"); + dolibarr_syslog ("Directory '".$dir[$i]."' exists"); } - else + else { - if (create_exdir($dir[$i]) < 0) + if (create_exdir($dir[$i]) < 0) { - print ""; - $error++; + print ""; + $error++; } - else + else { - dolibarr_syslog("Directory '".$dir[$i]."' created"); + dolibarr_syslog("Directory '".$dir[$i]."' created"); } } } } } - - - /* - * Base de données - * - */ - if (! $error) + + /* + * Base de données + * + */ + if (! $error) { - include_once($dolibarr_main_document_root . "/conf/conf.class.php"); - - $conf = new Conf(); - $conf->db->type = trim($dolibarr_main_db_type); - $conf->db->host = trim($dolibarr_main_db_host); - $conf->db->name = trim($dolibarr_main_db_name); - $conf->db->user = trim($dolibarr_main_db_user); - $conf->db->pass = trim($dolibarr_main_db_pass); - - $userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:""; - $passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:""; - - - /* - * Si creation utilisateur admin demandée, on le crée - */ - if (isset($_POST["db_create_user"]) && $_POST["db_create_user"] == "on") + include_once($dolibarr_main_document_root . "/conf/conf.class.php"); + + $conf = new Conf(); + $conf->db->type = trim($dolibarr_main_db_type); + $conf->db->host = trim($dolibarr_main_db_host); + $conf->db->name = trim($dolibarr_main_db_name); + $conf->db->user = trim($dolibarr_main_db_user); + $conf->db->pass = trim($dolibarr_main_db_pass); + + $userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:""; + $passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:""; + + + /* + * Si creation utilisateur admin demandée, on le crée + */ + if (isset($_POST["db_create_user"]) && $_POST["db_create_user"] == "on") { - dolibarr_syslog("Creation de l'utilisateur: ".$dolibarr_main_db_user." choix base: ".$choix); - - if ($choix == 1) //choix 1=mysql + dolibarr_syslog("Creation de l'utilisateur: ".$dolibarr_main_db_user." choix base: ".$choix); + + if ($choix == 1) //choix 1=mysql { - //print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->pass; - - // Creation handler de base, verification du support et connexion - $db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot,'mysql'); - if ($db->error) + //print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->pass; + + // Creation handler de base, verification du support et connexion + $db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot,'mysql'); + if ($db->error) { - print $langs->trans("ThisPHPDoesNotSupportTypeBase",'mysql'); - $error++; + print $langs->trans("ThisPHPDoesNotSupportTypeBase",'mysql'); + $error++; } - - if (! $error) + + if (! $error) { - if ($db->connected) + if ($db->connected) { - $sql = "INSERT INTO user "; - $sql.= "(Host,User,password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv)"; - $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_user',password('$dolibarr_main_db_pass')"; - $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; - - //print "$sql
\n"; - - $db->query($sql); - - $sql = "INSERT INTO db "; - $sql.= "(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv)"; - $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_name','$dolibarr_main_db_user'"; - $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; - - //print "$sql
\n"; - - $resql=$db->query($sql); - if ($resql) + $sql = "INSERT INTO user "; + $sql.= "(Host,User,password,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv)"; + $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_user',password('$dolibarr_main_db_pass')"; + $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; + + //print "$sql
\n"; + + $db->query($sql); + + $sql = "INSERT INTO db "; + $sql.= "(Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Index_Priv,Alter_priv)"; + $sql.= " VALUES ('$dolibarr_main_db_host','$dolibarr_main_db_name','$dolibarr_main_db_user'"; + $sql.= ",'Y','Y','Y','Y','Y','Y','Y','Y');"; + + //print "$sql
\n"; + + $resql=$db->query($sql); + if ($resql) { - dolibarr_syslog("flush privileges"); - $db->query("FLUSH Privileges;"); - - print ''; - print ''; + dolibarr_syslog("flush privileges"); + $db->query("FLUSH Privileges;"); + + print ''; + print ''; } - else + else { - if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - dolibarr_syslog("Utilisateur deja existant"); - print ''; - print ''; + dolibarr_syslog("Utilisateur deja existant"); + print ''; + print ''; } - else + else { - dolibarr_syslog("impossible de creer l'utilisateur"); - print ''; - print '"; + dolibarr_syslog("impossible de creer l'utilisateur"); + print ''; + print '"; } } - - $db->close(); + + $db->close(); } - else + else { - print ''; - print ''; - print ''; - - // Affiche aide diagnostique - print ''; - - $error++; + print ''; + print ''; + print ''; + + // Affiche aide diagnostique + print ''; + + $error++; } } } - else //choix 2=postgresql + else //choix 2=postgresql { - //print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->pass; - - // Creation handler de base, verification du support et connexion - $db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot,$conf->db->name); - if ($db->error) + //print $conf->db->host." , ".$conf->db->name." , ".$conf->db->user." , ".$conf->db->pass; + + // Creation handler de base, verification du support et connexion + $db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot,$conf->db->name); + if ($db->error) { - print $langs->trans("ThisPHPDoesNotSupportTypeBase",'mysql'); - $error++; + print $langs->trans("ThisPHPDoesNotSupportTypeBase",'mysql'); + $error++; } - - if (! $error) + + if (! $error) { - if ($db->connected) + if ($db->connected) { - $nom = $dolibarr_main_db_user; - $sql = "create user \"".$nom."\" with password '".$dolibarr_main_db_pass."';"; - //print $query_str; - $resql = $db->query($sql); - if ($resql) + $nom = $dolibarr_main_db_user; + $sql = "create user \"".$nom."\" with password '".$dolibarr_main_db_pass."';"; + //print $query_str; + $resql = $db->query($sql); + if ($resql) { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } - else + else { - if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - dolibarr_syslog("Utilisateur deja existant"); - print ''; - print ''; + dolibarr_syslog("Utilisateur deja existant"); + print ''; + print ''; } - else + else { - dolibarr_syslog("impossible de creer l'utilisateur"); - print ''; - print '"; + dolibarr_syslog("impossible de creer l'utilisateur"); + print ''; + print '"; } } } - else + else { - print ''; - print ''; - print ''; - - // Affiche aide diagnostique - print ''; - - $error++; + print ''; + print ''; + print ''; + + // Affiche aide diagnostique + print ''; + + $error++; } } } - + } // Fin si "creation utilisateur" - - - /* - * Si creation database demandée, on la crée - */ - if (! $error && (isset($_POST["db_create_database"]) && $_POST["db_create_database"] == "on")) + + + /* + * Si creation database demandée, on la crée + */ + if (! $error && (isset($_POST["db_create_database"]) && $_POST["db_create_database"] == "on")) { - dolibarr_syslog ("Creation de la base : ".$dolibarr_main_db_name); + dolibarr_syslog ("Creation de la base : ".$dolibarr_main_db_name); - $db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot); + $db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot); - if ($db->connected) + if ($db->connected) { - if ($db->DDLCreateDb($dolibarr_main_db_name)) + if ($db->DDLCreateDb($dolibarr_main_db_name)) { - print ''; - print ""; + print ''; + print ""; } - else + else { - print ''; - print ''; + print ''; + print ''; - // Affiche aide diagnostique - print ''; + // Affiche aide diagnostique + print ''; - $error++; + $error++; } - $db->close(); + $db->close(); } - else { - print ''; - print ''; - print ''; + else { + print ''; + print ''; + print ''; - // Affiche aide diagnostique - print ''; + // Affiche aide diagnostique + print ''; - $error++; - } + $error++; + } } // Fin si "creation database" - /* - * On test maintenant l'accès par le user admin dolibarr - */ - if (! $error) + /* + * On test maintenant l'accès par le user admin dolibarr + */ + if (! $error) { - dolibarr_syslog("connexion de type=".$conf->db->type." sur host=".$conf->db->host." user=".$conf->db->user." name=".$conf->db->name); - //print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." user=".$conf->db->user." name=".$conf->db->name; + dolibarr_syslog("connexion de type=".$conf->db->type." sur host=".$conf->db->host." user=".$conf->db->user." name=".$conf->db->name); + //print "connexion de type=".$conf->db->type." sur host=".$conf->db->host." user=".$conf->db->user." name=".$conf->db->name; - $db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name); + $db = new DoliDb($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name); - if ($db->connected == 1) + if ($db->connected == 1) { - // si accès serveur ok et accès base ok, tout est ok, on ne va pas plus loin, on a même pas utilisé le compte root. - if ($db->database_selected == 1) + // si accès serveur ok et accès base ok, tout est ok, on ne va pas plus loin, on a même pas utilisé le compte root. + if ($db->database_selected == 1) { - dolibarr_syslog("la connexion au serveur par le user ".$conf->db->user." est reussie"); - print ""; + dolibarr_syslog("la connexion au serveur par le user ".$conf->db->user." est reussie"); + print ""; - dolibarr_syslog("la connexion a la base : ".$conf->db->name.",par le user : ".$conf->db->user." est reussie"); - print ""; + dolibarr_syslog("la connexion a la base : ".$conf->db->name.",par le user : ".$conf->db->user." est reussie"); + print ""; - $error = 0; + $error = 0; } - else + else { - dolibarr_syslog("la connection au serveur par le user ".$conf->db->user." est reussie"); - print ""; + dolibarr_syslog("la connection au serveur par le user ".$conf->db->user." est reussie"); + print ""; - dolibarr_syslog("la connexion a la base ".$conf->db->name.",par le user ".$conf->db->user." a échoué"); - print ""; + dolibarr_syslog("la connexion a la base ".$conf->db->name.",par le user ".$conf->db->user." a échoué"); + print ""; - // Affiche aide diagnostique - print ''; + // Affiche aide diagnostique + print ''; - $error++; + $error++; } } - else + else { - dolibarr_syslog("la connection au serveur par le user ".$conf->db->user." est rate"); - print ""; + dolibarr_syslog("la connection au serveur par le user ".$conf->db->user." est rate"); + print ""; - // Affiche aide diagnostique - print ''; + // Affiche aide diagnostique + print ''; - $error++; + $error++; } } } - - print '
"; - print $langs->trans("ErrorDirDoesNotExists",$main_dir).'
'; - print $langs->trans("ErrorWrongValueForParameter",$langs->trans("WebPagesDirectory")).'
'; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - print '
'; - print $langs->trans("Error"); - print "
"; + print $langs->trans("ErrorDirDoesNotExists",$main_dir).'
'; + print $langs->trans("ErrorWrongValueForParameter",$langs->trans("WebPagesDirectory")).'
'; + print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print '
'; + print $langs->trans("Error"); + print "
".$langs->trans("ConfigurationSaving")."".$langs->trans("OK")."
".$langs->trans("ConfigurationSaving")."".$langs->trans("OK")."
".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); - print "Vous devez créer ce dossier et permettre au serveur web d'écrire dans celui-ci"; - print ''; - print $langs->trans("Error"); - print "
".$langs->trans("ErrorDirDoesNotExists",$main_data_dir); + print "Vous devez créer ce dossier et permettre au serveur web d'écrire dans celui-ci"; + print ''; + print $langs->trans("Error"); + print "
"; - print "Failed to create directory: ".$dir[$i]; - print ''; - print $langs->trans("Error"); - print "
"; + print "Failed to create directory: ".$dir[$i]; + print ''; + print $langs->trans("Error"); + print "
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("OK").'
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("OK").'
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("LoginAlreadyExists").'
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("LoginAlreadyExists").'
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("Error").' '.$db->error()."
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("Error").' '.$db->error()."
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("Error").'

Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; - print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - print '
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("Error").'

Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; + print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; + print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; + print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print '
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("OK").'
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("OK").'
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("LoginAlreadyExists").'
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("LoginAlreadyExists").'
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("Error").' '.$db->error()."
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("Error").' '.$db->error()."
'; - print $langs->trans("UserCreation").' : '; - print $dolibarr_main_db_user; - print ''.$langs->trans("Error").'

Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; - print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - print '
'; + print $langs->trans("UserCreation").' : '; + print $dolibarr_main_db_user; + print ''.$langs->trans("Error").'

Vous avez demandé la création du login Dolibarr "'.$dolibarr_main_db_user.'", mais pour cela, '; + print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; + print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; + print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print '
'; - print $langs->trans("DatabaseCreation").' : '; - print $dolibarr_main_db_name; - print '".$langs->trans("OK")."
'; + print $langs->trans("DatabaseCreation").' : '; + print $dolibarr_main_db_name; + print '".$langs->trans("OK")."
'; - print $langs->trans("DatabaseCreation").' : '; - print $dolibarr_main_db_name; - print ''.$langs->trans("Error").' '.$db->errno().'
'; + print $langs->trans("DatabaseCreation").' : '; + print $dolibarr_main_db_name; + print ''.$langs->trans("Error").' '.$db->errno().'

La création de la base Dolibarr "'.$dolibarr_main_db_name.'" a échoué.'; - print 'Si la base existe déjà, revenez en arrière et désactiver l\'option "Créer la base de donnée".
'; - print '

La création de la base Dolibarr "'.$dolibarr_main_db_name.'" a échoué.'; + print 'Si la base existe déjà, revenez en arrière et désactiver l\'option "Créer la base de donnée".
'; + print '
'; - print $langs->trans("DatabaseCreation").' : '; - print $dolibarr_main_db_name; - print ''.$langs->trans("Error").'
'; + print $langs->trans("DatabaseCreation").' : '; + print $dolibarr_main_db_name; + print ''.$langs->trans("Error").'

Vous avez demandé la création de la base Dolibarr "'.$dolibarr_main_db_name.'", mais pour cela, '; - print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; - print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - print '

Vous avez demandé la création de la base Dolibarr "'.$dolibarr_main_db_name.'", mais pour cela, '; + print 'Dolibarr doit se connecter sur le serveur "'.$dolibarr_main_db_host.'" via le super utilisateur "'.$userroot.'".
'; + print 'La connexion ayant échoué, les paramètres du serveur ou du super utilisateur sont peut-etre incorrects. '; + print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print '
"; - print $langs->trans("ServerConnection")." : "; - print $dolibarr_main_db_host; - print ""; - print $langs->trans("OK"); - print "
"; + print $langs->trans("ServerConnection")." : "; + print $dolibarr_main_db_host; + print ""; + print $langs->trans("OK"); + print "
"; - print $langs->trans("DatabaseConnection")." : "; - print $dolibarr_main_db_name; - print ""; - print $langs->trans("OK"); - print "
"; + print $langs->trans("DatabaseConnection")." : "; + print $dolibarr_main_db_name; + print ""; + print $langs->trans("OK"); + print "
"; - print $langs->trans("ServerConnection")." : "; - print $dolibarr_main_db_host; - print ""; - print $langs->trans("OK"); - print "
"; + print $langs->trans("ServerConnection")." : "; + print $dolibarr_main_db_host; + print ""; + print $langs->trans("OK"); + print "
"; - print $langs->trans("DatabaseConnection")." : "; - print $dolibarr_main_db_name; - print ''; - print $langs->trans("Error"); - print "
"; + print $langs->trans("DatabaseConnection")." : "; + print $dolibarr_main_db_name; + print ''; + print $langs->trans("Error"); + print "

Vérifier que le nom de base "'.$dolibarr_main_db_name.'" est correct.
'; - print 'Si ce nom est correct et que cette base n\'existe pas déjà, vous devez cocher l\'option "Créer la base de donnée". '; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - print '

Vérifier que le nom de base "'.$dolibarr_main_db_name.'" est correct.
'; + print 'Si ce nom est correct et que cette base n\'existe pas déjà, vous devez cocher l\'option "Créer la base de donnée". '; + print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print '
"; - print $langs->trans("ServerConnection")." : "; - print $dolibarr_main_db_host; - print ''; - print ''.$db->error.''; - print "
"; + print $langs->trans("ServerConnection")." : "; + print $dolibarr_main_db_host; + print ''; + print ''.$db->error.''; + print "

Le serveur "'.$conf->db->host.'", nom de base "'.$conf->db->name.'", login "'.$conf->db->user.'", ou mot de passe "'.$conf->db->pass.'" de la base de donnée est peut-être incorrect ou la version du client PHP trop ancienne par rapport à la version de la base de donnée.
'; - print 'Si le login n\'existe pas encore, vous devez cocher l\'option "Créer l\'utilisateur".
'; - print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; - print '

Le serveur "'.$conf->db->host.'", nom de base "'.$conf->db->name.'", login "'.$conf->db->user.'", ou mot de passe "'.$conf->db->pass.'" de la base de donnée est peut-être incorrect ou la version du client PHP trop ancienne par rapport à la version de la base de donnée.
'; + print 'Si le login n\'existe pas encore, vous devez cocher l\'option "Créer l\'utilisateur".
'; + print $langs->trans("ErrorGoBackAndCorrectParameters").'

'; + print '
'; + print ''; } pFooter($error,$setuplang);