Bug #34662
closedFatal error 't3lib_lock' does not exist if deprecationLog = 'file'
100%
Description
It seems, that Commit f1fd1b69 introduced a problem in certain conditions:
if the deprecationLog is enabled and set to "file", each call of t3lib_div::deprecationLog will now result in a
t3lib_div::makeInstance('t3lib_lock', $destination, $GLOBALS['TYPO3_CONF_VARS']['SYS']['lockingMode']); (class.t3lib_div.php line:6032)
But it seems that the class is not yet available if the deprecationLog is called in t3lib/config_default.php
Here is the stack trace:
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class t3lib_lock does not exist' in /var/www/typo3_src/typo3_src-4.5.stable/t3lib/class.t3lib_div.php:5359 Stack trace: #0 /var/www/typo3_src/typo3_src-4.5.stable/t3lib/class.t3lib_div.php(5359): ReflectionClass->__construct('t3lib_lock') #1 /var/www/typo3_src/typo3_src-4.5.stable/t3lib/class.t3lib_div.php(6032): t3lib_div::makeInstance('t3lib_lock', '/var/www/...', 'simple') #2 /var/www/typo3_src/typo3_src-4.5.stable/t3lib/config_default.php(764): t3lib_div::deprecationLog('This TYPO3 inst...') #3 /var/www/typo3_src/typo3_src-4.5.stable/typo3/sysext/cms/tslib/index_ts.php(128): require('/var/www/typo3_...') #4 /var/www/typo3_src/typo3_src-4.5.stable/index.php(84): require('/var/www/typo3_...') #5 {main} thrown in /var/www/typo3_src/typo3_src-4.5.stable/t3lib/class.t3lib_div.php on line 5359
I didn't test it with higher versions, but probably the problem will also occur there.
Updated by Sebastian Enders over 12 years ago
I can confirm this error after I upgraded to Typo3 4.5.13.
(PHP 5.2)
Typo3 4.5.12 works fine.
The error didn't appear anymore in 4.5.13 after I put this lines to localconf.php:
$TYPO3_CONF_VARS['SYS']['displayErrors'] = '0';
$TYPO3_CONF_VARS['SYS']['errorHandlerErrors'] = '22519';
$TYPO3_CONF_VARS['SYS']['exceptionalErrors'] = '22527';
$TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] = '0';
$TYPO3_CONF_VARS['SYS']['systemLog'] = '';
$TYPO3_CONF_VARS['SYS']['systemLogLevel'] = '';
$TYPO3_CONF_VARS['BE']['allowDonateWindow'] = '0';
Updated by Uwe Trenkner over 12 years ago
Same here:
Typo3 4.5.12 works fine.
Typo3 4.5.13 produces the stated error message.
Updated by Pascal Uhlmann over 12 years ago
I can also confirm this problem with Typo3 v4.5.13 and PHP 5.2. Version 4.5.12 works fine.
Updated by Christian Nikoleit over 12 years ago
confirm -> TYPO3 4.5.13 and PHP 5.2
Updated by joujou no-lastname-given over 12 years ago
Same for me, adding $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] = '0'; in localconf.php is enough for me to correct things.
The problem appears with Typo3 4.5.13.
I also have a site with Typo3 4.5.13, $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] = 'file' and everything working fine...
Updated by Thomas Deinhamer over 12 years ago
I guess this is a real problem, I have this too. Need to change back to 4.5.12.
Updated by Steffen Gebert over 12 years ago
- Status changed from New to Accepted
- Target version set to 4.6.7
Updated by Steffen Gebert over 12 years ago
- Target version changed from 4.6.7 to 4.5.14
Updated by Oliver Hader over 12 years ago
What a pity... Thanks to all reporters for giving the details. We will investigate further and try to have this fixed and rolled-out again as soon as possible...
Updated by Steffen Gebert over 12 years ago
To sum it up, this happens only, if both of this (non-recommended) settings are set:
- $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] enabled
- non-UTF-8 database
Both are discouraged for production sites.
Updated by Jochen Weiland over 12 years ago
IMHO the deprecation log should not be enabled by default anyway, it should only be enabled for a short time for admins/developers to see if there is a problem.
Otherwise huge deprectionlog files can eat up your disk space.
Updated by Steffen Gebert over 12 years ago
Jochen, please stick to the topic (and this has been discussed thoroughly).
Updated by joujou no-lastname-given over 12 years ago
Right, the site I have that works with Typo3 4.5.13 and $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] = 'file' is in UTF-8.
Yet, I think many people don't use UTF-8 in prod.
Updated by Nico de Haen over 12 years ago
I didn't know that the default is "'enableDeprecationLog' => 'file', just saw it in config_default.php. This makes absolutely no sense to me. The deprecation log is only useful for developers!
Updated by joujou no-lastname-given over 12 years ago
By the way, is there a difference between setting $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] directly in localconf.php and setting it by the install tool configuration manager ?
Updated by Oliver Hader over 12 years ago
(as written in core mailing list)
The PHP fatal error occurs for the following settings
- $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] is enabled
- $TYPO3_CONF_VARS['BE']['forceCharset'] is not "utf-8" (or empty)
- $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] is set to "file"
The bug is, that t3lib_lock will then be called at a time when the
autoloader was not initialized yet.
Quick work-around
Disable $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] in Install Tool.
Since this behaviour might affect websites with TYPO3 4.5 LTS with old
non-UTF-8 character settings, we aim to have new releases soon (again).
Thanks for your patience!
Updated by Oliver Hader over 12 years ago
joujou wrote:
By the way, is there a difference between setting $TYPO3_CONF_VARS['SYS']['enableDeprecationLog'] directly in localconf.php and setting it by the install tool configuration manager ?
The effect is the same since the same value will be written from Install Tool to typo3conf/localconf.php.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9639
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9643
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9643
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9639
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/9688
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/9689
Updated by Oliver Hader over 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2eeaa4b017ccf02e04445529e69b26978f413b14.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed