Fix: Bad path of install log file
This commit is contained in:
parent
e1cdee191c
commit
de4cf814c0
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||||
*
|
*
|
||||||
@ -20,11 +20,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/install/etape1.php
|
* \file htdocs/install/etape1.php
|
||||||
\ingroup install
|
* \ingroup install
|
||||||
\brief Build conf file
|
* \brief Build conf file on disk
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc..php
|
define('DONOTLOADCONF',1); // To avoid loading conf by file inc..php
|
||||||
|
|
||||||
@ -420,7 +420,7 @@ if ($_POST["action"] == "set")
|
|||||||
print $langs->trans("OK");
|
print $langs->trans("OK");
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
dolibarr_install_syslog("etape1: connexion to database ".$conf->db->name.", bu user : ".$conf->db->user." has failed", LOG_ERR);
|
dolibarr_install_syslog("etape1: connexion to database ".$conf->db->name.", by user : ".$conf->db->user." has failed", LOG_ERR);
|
||||||
print "<tr><td>";
|
print "<tr><td>";
|
||||||
print $langs->trans("DatabaseConnection")." : ";
|
print $langs->trans("DatabaseConnection")." : ";
|
||||||
print $dolibarr_main_db_name;
|
print $dolibarr_main_db_name;
|
||||||
|
|||||||
@ -155,7 +155,7 @@ if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant alrea
|
|||||||
if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
|
if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
|
||||||
else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
|
else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
|
||||||
else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
|
else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
|
||||||
else if (@is_writable('../../../../')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
||||||
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
||||||
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -255,6 +255,7 @@ function dol_syslog($message, $level=LOG_INFO)
|
|||||||
{
|
{
|
||||||
$filelog=SYSLOG_FILE;
|
$filelog=SYSLOG_FILE;
|
||||||
$filelog=preg_replace('/DOL_DATA_ROOT/i',DOL_DATA_ROOT,$filelog);
|
$filelog=preg_replace('/DOL_DATA_ROOT/i',DOL_DATA_ROOT,$filelog);
|
||||||
|
//print $filelog;
|
||||||
if (defined("SYSLOG_FILE_NO_ERROR")) $file=@fopen($filelog,"a+");
|
if (defined("SYSLOG_FILE_NO_ERROR")) $file=@fopen($filelog,"a+");
|
||||||
else $file=fopen($filelog,"a+");
|
else $file=fopen($filelog,"a+");
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user