Feature #14203
closedlogging did not work
0%
Description
In V 3.6.1 in class.tslib_fe.php there are changes in the function statistics()
I wonder because Logging did not work anymore, in Version 3.6.0 it does!
The error is that the constant PATH_site was added before $this->config['stat_vars']['logFile']..
Solution for me was to delete PATH_site on this place.
This did not make any sense and people updating would wonder as I did.
The logfile is not under the Site-path (security reasons) and awstat dont know were to look for logfiles....
(issue imported from #M159)
Files
Updated by Michael Stucki over 20 years ago
According to [1] there were no changes in class.tslib_fe.php between 3.6.0 and 3.6.1.
Can you please recheck?
Updated by Daniel Poetzinger over 20 years ago
? solved but not tested?
I wonder because I must change this file in two of your client servers..
There are definitly changes in the function statistics() see the description.
It works with 3.6.0RC1 which seems not to be tagged or whatever..
If there is a solution without changing the source it is ok .
I added the Version of the function which was actual since 3.6.0RC as an attachment!
bearbeitet am: 02.07.04 22:08
bearbeitet am: 02.07.04 22:09
Updated by Michael Stucki over 20 years ago
Ah, I see. The problem was introduced with revision 1.11 (Fixed lots of issues related to safe_mode and open_basedir. Should all work now!)
Updated by Michael Stucki over 20 years ago
This patch should do the trick. Please confirm, thanks.
Updated by Daniel Poetzinger over 20 years ago
It works but:
This line makes no sense:
if(!ereg("^/", $logFileName)) $logFileName = PATH_site.$logFileName;
look at function getConfigArray().:
...
// STAT:
$theLogFile = $this->TYPO3_CONF_VARS['FE']['logfile_dir'].$this->config['config']['stat_apache_logfile'];
if ($this->config['config']['stat_apache'] &&
$this->config['config']['stat_apache_logfile'] &&
!strstr($this->config['config']['stat_apache_logfile'],'/') &&
@is_dir($this->TYPO3_CONF_VARS['FE']['logfile_dir']) && @is_file($theLogFile) && @is_writeable($theLogFile)) {
$this->config['stat_vars']['logFile'] = $theLogFile;
As you see:
This function checks if $logFileName exist, if not the needed $this->config['stat_vars'] is not filled so stat is not printed.
You have to add this in this function and have to set $this->config['stat_vars']['logFile'].
Byside - why use ereg and not strstr which is faster?
Additionaly an logmessage would be nice in this functiomn getConfigArray like:
else {
$GLOBALS['TT']->push('Could not set config array for statistic. (check logfile and permissions)','');
}
bearbeitet am: 05.07.04 11:15
Updated by Michael Stucki over 20 years ago
You're right, thanks. I have attached a new patch. Didn't test it, so please confirm if this works...
Updated by Ingmar Schlecht over 20 years ago
As soon as Stucki's patch is confirmed to work, it can go into 3.7.
So anyone tested it?
Updated by Michael Stucki about 20 years ago
Fixed now. Please test this in the 3.7RC!
Updated by Daniel Poetzinger over 19 years ago
The Bug appears again in 3.7.0
Why is the logPath checked with:
t3lib_div::isAllowedAbsPath
I dont want to log into the Pathsite!
Please remove this check, it makes bo sense here , right?
Greetings
Updated by Daniel Poetzinger about 19 years ago
It is still not possible to log outside the sitepath.
It is a securityhole to have the logfile available under the webrootpath.
Updated by Michael Stucki about 19 years ago
It is possible if you add your logfile path to TYPO3_CONF_VARS[BE][lockRootPath].