Bug #35154
closedExclude E_STRICT from exceptionalErrors in PHP 5.4
100%
Description
From PHP 5.4, E_STRICT became part of E_ALL
This leads to a whole bunch of thrown exception on PHP runtime notices.
To keep behavior of error handling with PHP 5.4, we need to exclude E_STRICT from exceptionalErrors:
I am not sure, if replacing:
E_ALL
with
E_ALL & ~E_STRICT
is working in combination with ^ operator.
For example, replace:
E_ALL ^ E_NOTICE
with
E_ALL & ~E_STRICT ^ E_NOTICE
Can any please confirm?
I can't test ATM because PHP started to constantly segfault my apache.
Updated by Markus Klein over 12 years ago
Just to ensure the bitmask is correct:
E_ALL & ~(E_STRICT | E_NOTICE)
Updated by Gerrit Code Review over 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10524
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/10524
Updated by Peter Niederlag over 12 years ago
@backporting: there migth be additional calls which set the error_reporting() level that need to be fixed! (typo3/sysext/cms/tslib/index_ts.php)
Updated by Gerrit Code Review over 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10524
Updated by Gerrit Code Review over 12 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10524
Updated by Gabriel Kaufmann / Typoworx NewMedia over 12 years ago
I tried to get TYPO3 4.6.8 work on PHP 5.4. My current Ubuntu provided PHP 5.3 seems to encounter an PHP-Bug, so I compiled the latest PHP5 stable (5.4 release) as alternative.
I didn't get TYPO3 to get work stable on this PHP5 release! I got the "Core" working mostly after patching "/index.php" and "/typo3/init.php" with my own error_reporting settings.
I think the original error-reporting setup should be replaced like this:
TYPO3-Core files:- /index.php
- /typo3/init.php
@
// ***********************
// Set error reporting
// ***********************
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
// PHP 5.4 FIX, TYPOWORX <info@typoworx.de>
if (strnatcmp(phpversion(),'5.4.0') >= 0) {
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);
}
@
But non the less, the result is very poor. A lot of TYPO3 Core-Classes and Extension-Classes doesn't seem to work fine on PHP 5.4 release without a bunch of improvements.
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/11636
Updated by Gerrit Code Review over 12 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10524
Updated by Gerrit Code Review over 12 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10524
Updated by Gerrit Code Review over 12 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10524
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/11636
Updated by Steffen Müller over 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4f73988debdb28469609bc80d4361dfa464c47bf.
Updated by Mario Rimann over 12 years ago
How can we make sure that this change will be applied to 4.6 and 4.5 branches and end up in the next maintenance release of those?
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved 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/12528
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/12529
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12529
Updated by Mario Rimann over 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset d8f537d182dbe5ca0f3c8dfb10a13e06520e95c3.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/12691
Updated by Philipp Gampe over 12 years ago
- Status changed from Under Review to Resolved
Applied in changeset ce5ba95ca61b55c1bc59433ea347f32901f474e1.
Updated by Gerrit Code Review over 12 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/13156
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/13291
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/13313
Updated by Wouter Wolters about 12 years ago
Please close this issue. All affected branches are up to date.
Updated by Stefan Galinski about 12 years ago
- Status changed from Under Review to Closed
Updated by Bernhard Eckl over 11 years ago
I also had the same problem and tried so many things for a few hours. I cloned a T3 system to a new Debian 7 server with PHP 5.4. I have set via .htaccess:
php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 php_value error_reporting 0 php_value display_errors 0 php_value display_errors Off php_value error_reporting 0 php_value display_errors 0 php_value error_reporting 30719
And via localconf.php:
$TYPO3_CONF_VARS['SYS']['exceptionalErrors'] = '30711'; $TYPO3_CONF_VARS['SYS']['errorHandlerErrors'] = '30711';
But it did not help. Opening phpinfo via install tool gives mie:
error_reporting local = 22519
error_reporting master = 30719
But when I set php_admin_value error_reporting 30711 in the apache configuration, the strict errors are gone and I have error_reporting local = 30711.
Like this:
<Directory /var/www/vhosts/host/> Options Indexes FollowSymLinks MultiViews php_admin_value error_reporting 30711 AllowOverride All Order allow,deny allow from all </Directory>
So I think TYPO3 overwrites that values. If I ran phpinfo separately (not via Install Tool), it displays the same local value as the master value.
TYPO3 version ist 4.7.12.