Sep 25, 2014 Tag: TYPO3
Updating a TYPO3 4.4 installation should be easy. But you may encounter “strict standards trouble”. Keywords: TYPO3 4.4, PHP 5.4, fatal error, solution
Update a TYPO3 v4.4 installation
There it is, that peaceful looking 4.4 installation. It needs an update to 4.5 LTS now and to 6.2 LTS soon. Can that be that difficult? It shouldn’t. So let’s copy the installation to a local server first and try the things there first.
Fatal error: strict standards, getClassName()
But oops, what’s this? It doesn’t work at all but dies with a fatal error:
The exact error messages are:
Error: (!) Strict standards: Non-static method t3lib_div::getClassName() should not be called statically in /home/marble/htdocs/site/public_html/typo3_src-4.4.15/t3lib/class.t3lib_div.php on line 5271
Error: (!) Fatal error: Uncaught exception ‘t3lib_error_Exception’ with message ‘PHP Runtime Notice: Non-static method t3lib_div::getClassName() should not be called statically in /home/marble/htdocs/site/public_html/typo3_src-4.4.15/t3lib/class.t3lib_div.php line 5271’ in /home/marble/htdocs/site/public_html/typo3_src-4.4.15/t3lib/error/class.t3lib_error_errorhandler.php on line 106
Let’s search the web. We go looking for php strict standards and that
quickly tells us that its due to PHP 5.4 that now does include E_STRICT in E_ALL. So we need to disable
error reporting for E_STRICT
errors.
But what’s the best way to disable E_STRICT
in PHP error_reporting?
I tried several things and really wasted some time.
To cut things short: Don’t tweak your php.ini
or .htaccess
files.
And don’t patch the TYPO3 source either which sets the error_reporting
value
at several places. Instead:
Tip: Add a line to the typo3conf/localconf.php
file that removes the
E_STRICT bit (value 2048) from the error_reporting
value:
$TYPO3_CONF_VARS['SYS']['exceptionalErrors'] ^= E_STRICT;
I hope this saves you some time in case you encounter the same problem. Have fun!
Updated on Oct 22, 2014: Meanwhile a similar problem is in the TYPO3 bug tracker and has been been fixed already: Issues 62409 and 62391.
Updated on Oct 28, 2015
See also: <TYPO3 issue <https://forge.typo3.org/issues/39232>`__