Project

General

Profile

Actions

Bug #63144

closed

PHP 5.6: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version

Added by Chris topher over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2014-11-22
Due date:
% Done:

100%

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

Description

Trying to open the Backend of TYPO3 6.2 with the current PHP 5.6.3 gives this deprecation notice:

Deprecated: 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. in Unknown on line 0

Warning: Cannot modify header information - headers already sent in Unknown on line 0

Backtrace:

Uncaught TYPO3 Exception
#1: PHP Warning: Cannot modify header information - headers already sent in 
...\typo3\sysext\core\Classes\Authentication\AbstractUserAuthentication.php line 478 (More information)

TYPO3\CMS\Core\Error\Exception thrown in file
...\typo3\sysext\core\Classes\Error\ErrorHandler.php in line 101.

5 TYPO3\CMS\Core\Error\ErrorHandler::handleError(2, "Cannot modify header information - 
headers already sent", "...\typo3\sysext\core\Classes\Authentication\AbstractUserAuthentication.php", 478, array)

4 header("Expires: 0")

...\typo3\sysext\core\Classes\Authentication\AbstractUserAuthentication.php:

00476:   // Set all possible headers that could ensure that the script is not cached on the client-side
00477:   if ($this->sendNoCacheHeaders && !(TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI)) {

00478:    header('Expires: 0');

00479:    header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
00480:    $cacheControlHeader = 'no-cache, must-revalidate';

3 TYPO3\CMS\Core\Authentication\AbstractUserAuthentication::start()

...\typo3\sysext\core\Classes\Core\Bootstrap.php:

00981:   // might trigger code which relies on it. See: #45625
00982:   $GLOBALS['BE_USER'] = $backendUser;

00983:   $backendUser->start();

00984:   return $this;
00985:  }

2 TYPO3\CMS\Core\Core\Bootstrap::initializeBackendUser()

...\typo3\init.php:

00056:  ->loadExtensionTables(TRUE)
00057:  ->initializeSpriteManager()

00058:  ->initializeBackendUser()

00059:  ->initializeBackendAuthentication()
00060:  ->initializeBackendUserMounts()

1 require("...\typo3\init.php")

...\typo3\ajax.php:

00042: }
00043: 

00044: require __DIR__ . '/init.php';

00045: 
00046: // Finding the script path from the registry

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #68337: Problem with php 5.6 and TYPO3ViewportInstanceClosed2015-07-18

Actions
Actions #1

Updated by Chris topher over 9 years ago

  • Description updated (diff)
Actions #2

Updated by Marcus Schwemer over 9 years ago

Hi

I get the same error with "TYPO3 7.1.0 - dev" and mysql 5.6.22 (homebrew) on MacOSX

Kind regards,
Marcus

Actions #3

Updated by Helmut Hummel almost 9 years ago

  • Status changed from New to Rejected

Just configure your PHP settings correctly. There is nothing we can change in TYPO3 to avoid this warning, as it is emitted on language level

See e.g.: http://stackoverflow.com/questions/26261001/warning-about-http-raw-post-data-being-deprecated

Actions #4

Updated by Chris topher almost 9 years ago

I think it is stupid that PHP 5.6 ships with a configuration, which makes it throw deprecation warnings by default. When I created this issue, I thought that simply adding a @ini_set('always_populate_raw_post_data', -1); would make this message go away as well; I remember that googling this issue brought up other projects, which "solved" the issue exactly this way.

But turns out always_populate_raw_post_data in fact can only be set in PHP_INI_PERDIR [1]. It is not possible to change the value from inside TYPO3. All we can do is warn, if it is not set correctly.

Actions #5

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from Rejected to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42532

Actions #6

Updated by Morton Jonuschat almost 9 years ago

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

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF