mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Résolution du problème d'installation "Class Conf not found"
This commit is contained in:
parent
4a97c81a08
commit
67d5846dca
|
|
@ -168,6 +168,7 @@ if ($_POST["action"] == "set")
|
|||
if (file_exists("$conffile"))
|
||||
{
|
||||
include("$conffile"); // On force rechargement. Ne pas mettre include_once !
|
||||
conf($dolibarr_main_document_root);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -250,19 +251,7 @@ if ($_POST["action"] == "set")
|
|||
*/
|
||||
if (! $error)
|
||||
{
|
||||
$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);
|
||||
if (! isset($character_set_client) || ! $character_set_client) $character_set_client='ISO-8859-1';
|
||||
$conf->character_set_client=trim($character_set_client);
|
||||
if (! isset($dolibarr_main_db_charset) && ! $dolibarr_main_db_charset) $dolibarr_main_db_charset='latin1';
|
||||
$conf->db->character_set=trim($dolibarr_main_db_charset);
|
||||
if (! isset($collation_connection) || ! $collation_connection) $collation_connection='latin1_swedish_ci';
|
||||
$conf->db->collation_connection=trim($collation_connection);
|
||||
|
||||
conf($dolibarr_main_document_root );
|
||||
|
||||
$userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:"";
|
||||
$passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
|
||||
|
|
@ -288,7 +277,7 @@ if ($_POST["action"] == "set")
|
|||
|
||||
$db = new DoliDb($conf->db->type,$conf->db->host,$userroot,$passroot,$databasefortest);
|
||||
if ($db->error)
|
||||
{
|
||||
{
|
||||
print '<div class="error">'.$db->error.'</div>';
|
||||
$error++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ if ($_POST["action"] == "set")
|
|||
while (!feof ($fp))
|
||||
{
|
||||
$buffer = fgets($fp, 4096);
|
||||
print "<tr><td>Insertion ligne : $buffer</td><td>";
|
||||
//print "<tr><td>Insertion ligne : $buffer</td><td>";
|
||||
if (strlen(trim(ereg_replace("--","",$buffer))))
|
||||
{
|
||||
if ($db->query($buffer))
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
require_once('../translate.class.php');
|
||||
require_once('../lib/functions.inc.php');
|
||||
|
||||
global $conf;
|
||||
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
||||
// et non path absolu.
|
||||
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
||||
|
|
@ -51,20 +51,8 @@ if (file_exists($conffile))
|
|||
|
||||
if ($dolibarr_main_document_root)
|
||||
{
|
||||
require_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);
|
||||
if (! isset($character_set_client) || ! $character_set_client) $character_set_client='ISO-8859-1';
|
||||
$conf->character_set_client=$character_set_client;
|
||||
if (! isset($dolibarr_main_db_charset) && ! $dolibarr_main_db_charset) $dolibarr_main_db_charset='latin1';
|
||||
$conf->db->character_set=$dolibarr_main_db_charset;
|
||||
if (! isset($collation_connection) || ! $collation_connection) $collation_connection='latin1_swedish_ci';
|
||||
$conf->db->collation_connection=$collation_connection;
|
||||
|
||||
require($dolibarr_main_document_root . "/conf/conf.class.php");
|
||||
conf($dolibarr_main_document_root );
|
||||
}
|
||||
if ($dolibarr_main_document_root && $dolibarr_main_db_type && ! defined('DONOTLOADCONF'))
|
||||
{
|
||||
|
|
@ -112,9 +100,31 @@ $bc[false]=' class="bg1"';
|
|||
$bc[true]=' class="bg2"';
|
||||
|
||||
|
||||
function conf($dolibarr_main_document_root){
|
||||
require_once($dolibarr_main_document_root . "/conf/conf.class.php");
|
||||
global $conf;
|
||||
global $dolibarr_main_db_type;
|
||||
global $dolibarr_main_db_host;
|
||||
global $dolibarr_main_db_name;
|
||||
global $dolibarr_main_db_user;
|
||||
global $dolibarr_main_db_pass;
|
||||
$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);
|
||||
if (! isset($character_set_client) || ! $character_set_client) $character_set_client='ISO-8859-1';
|
||||
$conf->character_set_client=$character_set_client;
|
||||
if (! isset($dolibarr_main_db_charset) && ! $dolibarr_main_db_charset) $dolibarr_main_db_charset='latin1';
|
||||
$conf->db->character_set=$dolibarr_main_db_charset;
|
||||
if (! isset($collation_connection) || ! $collation_connection) $collation_connection='latin1_swedish_ci';
|
||||
$conf->db->collation_connection=$collation_connection;
|
||||
|
||||
}
|
||||
|
||||
function pHeader($soutitre,$next,$action='set')
|
||||
{
|
||||
|
||||
global $conf;
|
||||
global $langs;
|
||||
$langs->load("main");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user