Bug #70005
Updated by Markus Klein about 9 years ago
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: <pre> 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 </pre> which reference these 2 functions: - Bootstrap.php <pre> ``` /** * 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; } </pre> ``` - AbstractUserAuthentication <pre> ``` 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); } </pre> When switching back to php 5.5.26, everything works fine.