diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php index 31ed3ce65c0..b49c43577fa 100644 --- a/htdocs/install/etape1.php +++ b/htdocs/install/etape1.php @@ -168,8 +168,8 @@ if ($HTTP_POST_VARS["action"] == "set") $conf = new Conf(); $conf->db->host = $dolibarr_main_db_host; $conf->db->name = "mysql"; - $conf->db->user = $HTTP_POST_VARS["db_user_root"]; - $conf->db->pass = $HTTP_POST_VARS["db_user_pass"]; + $conf->db->user = isset($HTTP_POST_VARS["db_user_root"])?$HTTP_POST_VARS["db_user_root"]:""; + $conf->db->pass = isset($HTTP_POST_VARS["db_user_pass"])?$HTTP_POST_VARS["db_user_pass"]:""; $db = new DoliDb(); $sql = "INSERT INTO user "; @@ -192,7 +192,11 @@ if ($HTTP_POST_VARS["action"] == "set") } else { - print "Création de l'utilisateur : $dolibarr_main_db_userERREUR"; + if ($db->errno() == 1062) { + print "Création de l'utilisateur : $dolibarr_main_db_userDeja existant"; + } else { + print "Création de l'utilisateur : $dolibarr_main_db_userERREUR"; + } } $db->close(); @@ -245,8 +249,8 @@ if ($HTTP_POST_VARS["action"] == "set") $conf = new Conf(); $conf->db->host = $dolibarr_main_db_host; $conf->db->name = "mysql"; - $conf->db->user = $HTTP_POST_VARS["db_user_root"]; - $conf->db->pass = $HTTP_POST_VARS["db_user_pass"]; + $conf->db->user = isset($HTTP_POST_VARS["db_user_root"])?$HTTP_POST_VARS["db_user_root"]:""; + $conf->db->pass = isset($HTTP_POST_VARS["db_user_pass"])?$HTTP_POST_VARS["db_user_pass"]:""; $db = new DoliDb(); if ($ok) diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php index a61a512830a..1c87823819a 100644 --- a/htdocs/install/etape2.php +++ b/htdocs/install/etape2.php @@ -1,3 +1,26 @@ + + * Copyright (C) 2004 Laurent Destailleur + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +?> @@ -47,15 +70,14 @@ if ($HTTP_POST_VARS["action"] == "set") $ok = 1 ; - $result = $db->list_tables($dolibarr_db_name); - if ($result) - { - print "toto"; - while ($row = $db->fetch_row()) - { - print "Table : $row[0]\n"; - } - } + //$result = $db->list_tables($dolibarr_main_db_name); + //if ($result) + //{ + // while ($row = $db->fetch_row()) + // { + // print "Table : $row[0]
\n"; + // } + //} // Création des tables $dir = "../../mysql/tables/"; @@ -86,8 +108,13 @@ if ($HTTP_POST_VARS["action"] == "set") } else { - print "ERREUR"; + if ($db->errno() == 1050) { + print "Déjà existante"; + } + else { + print "ERREUR ".$db->errno().""; $error++; + } } } @@ -116,8 +143,12 @@ if ($HTTP_POST_VARS["action"] == "set") else { $ok = 0; - print $db->error(); - print "

".$buffer."

"; + if ($db->errno() == 1062) { + // print "Insertion ligne : $bufferDéja existante"; + } + else { + print "Erreur SQL ".$db->errno()." sur requete '$buffer'
"; + } } } } diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index c8d9f625e0b..a98f703376d 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -1,3 +1,26 @@ + + * Copyright (C) 2004 Laurent Destailleur + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ +?> @@ -10,7 +33,7 @@ Installation de Dolibarr - Etape $etape/$etapes"; $conf = "../conf/conf.php"; diff --git a/htdocs/install/index.php b/htdocs/install/index.php index 11afc1f3e84..64233e6f4a8 100644 --- a/htdocs/install/index.php +++ b/htdocs/install/index.php @@ -91,7 +91,7 @@ if(! isset($dolibarr_main_url_root) || strlen($dolibarr_main_url_root) == 0) { $dolibarr_main_document_root = substr($_SERVER["SCRIPT_FILENAME"],0,strlen($_SERVER["SCRIPT_FILENAME"])-18); # Nettoyage du path proposé - $dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root); # Gere les chemins windows avec double "\" + $dolibarr_main_document_root = str_replace('\\\\','/',$dolibarr_main_document_root); # Gere les chemins windows avec double "\" $dolibarr_main_document_root = ereg_replace('[\\\\\/]$','',$dolibarr_main_document_root); # Supprime le "\" ou "/" de fin } print "$dolibarr_main_document_root"; @@ -139,10 +139,10 @@ exemples :
-Login +Login administrateur de la base -
Login de l'utilisateur ayant les droits de création de la base de données, inutile si vous êtes chez un hébergeur, votre base de données est déjà créée. Laisser vide si vous vous connectez en anonymous
+
Login de l'utilisateur ayant les droits de création de bases de données.
Si vous avez déjà une base, vierge ou non, pour accueillir les tables dolibarr (exemple si vous êtes chez un hébergeur), ne rien remplir. Laisser vide également si vous vous connectez en anonymous
@@ -155,10 +155,7 @@ exemples :
- - -

Base de données Dolibarr

- +

Base de données Dolibarr

Nom de la base de données