Problem/Motivation

Watchdog logs an error during installation, just after the log entry announcing "tour module installed":

Warning: Cannot modify header information - headers already sent by (output started at /Users/fra/Sites/drupalotto/vendor/symfony/http-foundation/Response.php:357) in Drupal\Core\Session\SessionManager->destroy() (linea 267 di /Users/fra/Sites/drupalotto/core/lib/Drupal/Core/Session/SessionManager.php).

SessionManager->destroy() calls setcookie() after something sent some ouput.

Proposed resolution

Remaining tasks

  • Debug it and found out what sent a response.
  • TBD

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Does this only happen with beta12 or also with beta11?

loopduplicate’s picture

It also happens on beta 11

Kristen Pol’s picture

I also see this on beta13. I just tested with simplytest.me and looked at php watchdog logs and see:

<em class="placeholder">Warning</em>: Cannot modify header information - headers already sent by (output started at /home/d9yk/www/core/vendor/symfony/http-foundation/Response.php:1249) in <em class="placeholder">Drupal\Core\Session\SessionManager-&gt;destroy()</em> (line <em class="placeholder">267</em> of <em class="placeholder">/home/d9yk/www/core/lib/Drupal/Core/Session/SessionManager.php</em>).
Kristen Pol’s picture

Issue summary: View changes
Kristen Pol’s picture

I just noticed that the php warning came right after the tour module was installed so maybe it has something to do with that. We should try to reproduce this timing.

nicrodgers’s picture

Project: Drupal 8 multilingual demo » Drupal core
Version: 8.x-1.x-dev » 8.0.x-dev
Component: Code » install system

Can reproduce this in a plain Drupal core install, so it's not specific to the Drupal 8 multilingual demo project.

Steps to reproduce:
1. Download drupal 8 (rc1 or 8.0x-dev)
2. Go through the install process, selecting for a Standard install.

Actual result:
After installing, go to /admin/reports/dblog and observe there is a php error: "Warning: Cannot modify header information - headers already sent"

Expected result:
No php error.

JeroenT’s picture

I recently installed Drupal 8.0.1 and got the following error:

Location http://drupal8.dev/core/install.php/?id=1&langcode=nl&op=do_nojs&op=fini...
Referrer http://drupal8.dev/core/install.php?rewrite=ok&langcode=nl&profile=stand...
Message Warning: Cannot modify header information - headers already sent by (output started at .../vendor/symfony/http-foundation/Response.php:357) in Drupal\Core\Session\SessionManager->destroy() (line 267 of .../core/lib/Drupal/Core/Session/SessionManager.php).
fradipa’s picture

Hi, same thing with 8.0.3:

Warning: Cannot modify header information - headers already sent by (output started at /Users/fra/Sites/drupalotto/vendor/symfony/http-foundation/Response.php:357) in Drupal\Core\Session\SessionManager->destroy() (linea 267 di /Users/fra/Sites/drupalotto/core/lib/Drupal/Core/Session/SessionManager.php).

Cheers

cilefen’s picture

Issue summary: View changes
Issue tags: +Needs issue summary update

@fradipa Thank you for the update. I just confirmed it too in 8.0.x and 8.1.x HEAD.

cilefen’s picture

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

quietone’s picture

Status: Active » Closed (cannot reproduce)
Issue tags: +Bug Smash Initiative

Using the steps in #8 I was not able to reproduce the problem. I did an install in English and Italian and neither produced an error about Headers already sent.

Therefore, closing as cannot reproduce. If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").

Thanks!