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"))
|
if (file_exists("$conffile"))
|
||||||
{
|
{
|
||||||
include("$conffile"); // On force rechargement. Ne pas mettre include_once !
|
include("$conffile"); // On force rechargement. Ne pas mettre include_once !
|
||||||
|
conf($dolibarr_main_document_root);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -250,19 +251,7 @@ if ($_POST["action"] == "set")
|
|||||||
*/
|
*/
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$conf = new Conf();
|
conf($dolibarr_main_document_root );
|
||||||
$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);
|
|
||||||
|
|
||||||
|
|
||||||
$userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:"";
|
$userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:"";
|
||||||
$passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
|
$passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
|
||||||
|
|||||||
@ -378,7 +378,7 @@ if ($_POST["action"] == "set")
|
|||||||
while (!feof ($fp))
|
while (!feof ($fp))
|
||||||
{
|
{
|
||||||
$buffer = fgets($fp, 4096);
|
$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 (strlen(trim(ereg_replace("--","",$buffer))))
|
||||||
{
|
{
|
||||||
if ($db->query($buffer))
|
if ($db->query($buffer))
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
require_once('../translate.class.php');
|
require_once('../translate.class.php');
|
||||||
require_once('../lib/functions.inc.php');
|
require_once('../lib/functions.inc.php');
|
||||||
|
global $conf;
|
||||||
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
||||||
// et non path absolu.
|
// et non path absolu.
|
||||||
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
||||||
@ -51,20 +51,8 @@ if (file_exists($conffile))
|
|||||||
|
|
||||||
if ($dolibarr_main_document_root)
|
if ($dolibarr_main_document_root)
|
||||||
{
|
{
|
||||||
require_once($dolibarr_main_document_root . "/conf/conf.class.php");
|
require($dolibarr_main_document_root . "/conf/conf.class.php");
|
||||||
$conf=new Conf();
|
conf($dolibarr_main_document_root );
|
||||||
$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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($dolibarr_main_document_root && $dolibarr_main_db_type && ! defined('DONOTLOADCONF'))
|
if ($dolibarr_main_document_root && $dolibarr_main_db_type && ! defined('DONOTLOADCONF'))
|
||||||
{
|
{
|
||||||
@ -112,9 +100,31 @@ $bc[false]=' class="bg1"';
|
|||||||
$bc[true]=' class="bg2"';
|
$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')
|
function pHeader($soutitre,$next,$action='set')
|
||||||
{
|
{
|
||||||
|
|
||||||
global $conf;
|
global $conf;
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user