Project

General

Profile

Actions

Bug #39232

closed

PHP error_reporting cannot be set properly, E_STRICT errors shown on PHP 5.4

Added by Mario Rimann almost 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2012-07-25
Due date:
% Done:

0%

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

Description

Hi

I tested this with
  • TYPO3 v4.5.17
  • PHP 5.4.4
  • Ubuntu 10.04 LTS

Running the TYPO3 website with PHP 5.3.x runs fine. As soon as it's ran on PHP 5.4.4, several "Strict Standards"-errors are shown in the frontend, many of the following (with different files and line numbers):

Strict Standards: Non-static method t3lib_TSparser::checkIncludeLines() should not be called statically, assuming $this from incompatible context in /path_to_directory/typo3_src-4.5.17/t3lib/class.t3lib_tsparser.php on line 642

Setting error_reporting to 30711 (equivalent to E_ALL without E_STRICT and E_NOTICE) directly in php.ini does not solve the problem, altough a simple test-script shows the correct value (echo error_reporting()).

After some hours of trial and error, I got it to be silent:

The only way that I found to silence this TYPO3 installation, was to set the error_reporting level via the Apache vHost-Configuration. So in my config file, I have the following entry:

<Directory /var/www/vhosts/test54.ch/httpdocs>
    php_admin_value error_reporting 30711
</Directory>

As soon as this value is in, the E_STRICT notices are gone from the FE output.

Another way to achieve the same thing, is to have this in the global configuration (e.g. in /etc/apache2/conf.d/php_error_reporting.conf), this way it can be done once per server instead of adding it to the config of each single vHost:

<Directory /var/www/vhosts>
  php_admin_value error_reporting 30711
</Directory>

While this might be a PHP bug, I was not able to reproce any E_STRICT warning at all, while being on that server, but not within TYPO3. It looks like the TYPO3 internal "let's override the error_reporting level"-functionality (or something else within TYPO3) bring up this behaviour - but I'm really not sure what's wrong here.

I would understand it, if it would be the other way round, e.g. that things from php.ini cannot be overriden that easy - but here it's the exact oposite direction...?

This is probably somehow related to #35154 and #38691 and maybe also #38645


Related issues 4 (0 open4 closed)

Related to TYPO3 Core - Bug #38645: New error_reporting settings cause notice "undefined constant E_DEPRECATED " with PHP 5.2Closed2012-07-04

Actions
Related to TYPO3 Core - Bug #38691: Exclude E_STRICT on PHP 5.4ClosedPhilipp Gampe2012-07-05

Actions
Related to TYPO3 Core - Bug #51493: Error Reporting always set with E_WARNINGClosed2013-08-29

Actions
Is duplicate of TYPO3 Core - Bug #35154: Exclude E_STRICT from exceptionalErrors in PHP 5.4Closed2012-03-22

Actions
Actions

Also available in: Atom PDF