Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#5 | d8mi-demo-php-warning-during-install.png | 129.44 KB | Kristen Pol |
multilingual_demo-beta12-php-warning-headers-already-sent-2015-07-19_10-58-03.png | 217.11 KB | loopduplicate |
Comments
Comment #1
Gábor HojtsyDoes this only happen with beta12 or also with beta11?
Comment #2
loopduplicateIt also happens on beta 11
Comment #3
Kristen PolI also see this on beta13. I just tested with simplytest.me and looked at php watchdog logs and see:
Comment #4
Kristen PolComment #5
Kristen PolI 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.
Comment #6
nicrodgersCan 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.
Comment #7
JeroenTI recently installed Drupal 8.0.1 and got the following error:
Comment #8
fradipa CreditAttribution: fradipa as a volunteer commentedHi, 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
Comment #9
cilefen CreditAttribution: cilefen commented@fradipa Thank you for the update. I just confirmed it too in 8.0.x and 8.1.x HEAD.
Comment #10
cilefen CreditAttribution: cilefen commentedComment #19
quietone CreditAttribution: quietone as a volunteer commentedUsing 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!