Project

General

Profile

Actions

Bug #70005

closed

TYPO3 7.4 auf php 5.6.*, but not on 5.5.*

Added by Gone With the Wind over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-09-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Setting up a clean TYPO3 7.4 installation on a MAMP 3.4 environment with php 5.6.10 (no caches like opcode, APCu etc) leads to a failure in rendering the tree section: no icon to generate page entries are shown, neither are page shown that have been copied over from another TYPO3 instance via SQL.

The log file contains these error messages:

Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /[PATH]/typo3_src-7.4.0/typo3/sysext/core/Classes/Core/Bootstrap.php line 1113    

Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /[PATH]/typo3_src-7.4.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 423    

Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /[PATH]/typo3_src-7.4.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 422    

Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /[PATH]/typo3_src-7.4.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 409    

Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent in /[PATH]/typo3_src-7.4.0/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 408

which reference these 2 functions:

- Bootstrap.php

/**
 * Send HTTP headers if configured
 *
 * @return Bootstrap
 * @internal This is not a public API method, do not use in own extensions
 */
public function sendHttpHeaders() {
    if (!empty($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers']) && is_array($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers'])) {
        foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['HTTP']['Response']['Headers'] as $header) {
            header($header);
        }
    }
    return $this;
}

- AbstractUserAuthentication


if ($this->sendNoCacheHeaders && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {
    header('Expires: 0');
    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    $cacheControlHeader = 'no-cache, must-revalidate';
    $pragmaHeader = 'no-cache';
    // Prevent error message in IE when using a https connection
    // see http://forge.typo3.org/issues/24125
    $clientInfo = GeneralUtility::clientInfo();
    if ($clientInfo['BROWSER'] === 'msie' && GeneralUtility::getIndpEnv('TYPO3_SSL')) {
        // Some IEs can not handle no-cache
        // see http://support.microsoft.com/kb/323308/en-us
        $cacheControlHeader = 'must-revalidate';
        // IE needs "Pragma: private" if SSL connection
        $pragmaHeader = 'private';
    }
    header('Cache-Control: ' . $cacheControlHeader);
    header('Pragma: ' . $pragmaHeader);
}

When switching back to php 5.5.26, everything works fine.

Actions #1

Updated by Markus Klein over 8 years ago

  • Description updated (diff)
Actions #2

Updated by Markus Klein over 8 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (7.5)

Please enable the development-preset in the Install Tool. This looks like there is some error during processing which causes output to be produced, which automatically triggers some HTTP headers. After that the mentioned functions from core fail to set the headers.

Actions #3

Updated by Witali Rott over 8 years ago

It's not working because: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead.

A quick fix is to set this Lines in your .htaccess File:

<IfModule mod_php5.c>
php_value always_populate_raw_post_data -1
</IfModule>

Actions #4

Updated by Gone With the Wind over 8 years ago

@Markus Klein: development preset didn't generate any other output in Chrome console...

@Witali: this is indeed working perfectly fine.

Thank you both for your feedback and help!

Can this be documented anywhere? What would be the right place? Maybe the release documentation?
Otherwise, as far as I am concerned, this topic could be closed.

Actions #5

Updated by Wouter Wolters over 8 years ago

  • Status changed from Needs Feedback to Closed

We have added a check for this setting in the install tool in version 7 already. That should be enough.

Actions

Also available in: Atom PDF