Project

General

Profile

Actions

Bug #34662

closed

Fatal error 't3lib_lock' does not exist if deprecationLog = 'file'

Added by Nico de Haen about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2012-03-08
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #31460: flock() in class.t3lib_div.phpClosedDmitry Dulepov2011-10-31

Actions
Related to TYPO3 Core - Bug #38244: 't3lib_lock' does not exist if $TYPO3_CONF_VARS['SYS']['systemLog'] = 'file,...'Rejected2012-06-21

Actions
Actions #1

Updated by Sebastian Enders about 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';

Actions #2

Updated by Uwe Trenkner about 12 years ago

Same here:
Typo3 4.5.12 works fine.
Typo3 4.5.13 produces the stated error message.

Actions #3

Updated by Raphael Zschorsch about 12 years ago

Same here..

Actions #4

Updated by Pascal Uhlmann about 12 years ago

I can also confirm this problem with Typo3 v4.5.13 and PHP 5.2. Version 4.5.12 works fine.

Actions #5

Updated by Christian Nikoleit about 12 years ago

confirm -> TYPO3 4.5.13 and PHP 5.2

Actions #6

Updated by joujou no-lastname-given about 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...

Actions #7

Updated by Thomas Deinhamer about 12 years ago

I guess this is a real problem, I have this too. Need to change back to 4.5.12.

Actions #8

Updated by Steffen Gebert about 12 years ago

  • Status changed from New to Accepted
  • Target version set to 4.6.7
Actions #9

Updated by Steffen Gebert about 12 years ago

  • Target version changed from 4.6.7 to 4.5.14
Actions #10

Updated by Oliver Hader about 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...

Actions #11

Updated by Steffen Gebert about 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.

Actions #12

Updated by Jochen Weiland about 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.

Actions #13

Updated by Steffen Gebert about 12 years ago

Jochen, please stick to the topic (and this has been discussed thoroughly).

Actions #14

Updated by joujou no-lastname-given about 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.

Actions #15

Updated by Nico de Haen about 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!

Actions #16

Updated by joujou no-lastname-given about 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 ?

Actions #17

Updated by Oliver Hader about 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!

Actions #18

Updated by Oliver Hader about 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.

Actions #19

Updated by Gerrit Code Review about 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

Actions #20

Updated by Gerrit Code Review about 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

Actions #21

Updated by Gerrit Code Review about 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

Actions #22

Updated by Gerrit Code Review about 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

Actions #23

Updated by Gerrit Code Review about 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

Actions #24

Updated by Gerrit Code Review about 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

Actions #25

Updated by Oliver Hader about 12 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #26

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF