Warning when doing the update of the database on Drupal 8.6 using Drush

[warning] session_id(): Cannot change session id when headers already sent AbstractProxy.php:94

is it a problem ?

Thank you

Comments

zenimagine created an issue. See original summary.

voleger’s picture

Status: Active » Postponed (maintainer needs more info)
Related issues: +#2989734: PHP 7.3 compatibility

Thanks for the feedback.

Please, provide more info regarding PHP version.

voleger’s picture

Remove not related issue

alexpott’s picture

As a warning it should not have broken anything. Can @zenimagine provide more information about how the update was performed for example:

  • php version
  • using Drush/Console or UI
  • if using Drush/Console which version
alexpott’s picture

Ah looking at the screenshots Drush is being used. We tackled something similar before in #2901753: [PHP 7.2] DrupalKernel.php: ini_set(): Headers already sent. The question is why is this being invoked from the CLI.

zenimagine’s picture

I'm using PHP 7.2 and I'm doing the update with Composer and Drush

alexpott’s picture

@zenimagine I've done the update with only Drupal core standard profile and Drush on PHP 7.2 and I don't get the error. Maybe some module you have is causing this. What version of Drush are you using? I'm on 9.4.0

zenimagine’s picture

@alexpott

I have version 9.0.0-beta3 of drush

alexpott’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

So yep this has been fixed in Drush 9.4.0. It does not happen with that version but does with 9.0.0-beta3. Confirmed by testing locally and seeing the exact same warning. I don't see the warning with the currently support version of Drush.

zenimagine’s picture

Ok thanks, how to put drush up to date ?

charlie59’s picture

Still getting this error with Drush 10

seppe beelprez’s picture

Just like #11, I'm receiving this error too:
PHP 7.3.13
Drush 10.2

UPDATE:
looks like I didn't end my php tag in an empty .module file

pcate’s picture

I ran into this same error. The caused turned out to be an empty blank line accidentally inserted before the <?php tag in one of our settings files.

anthony.bouch’s picture

@PCate thank you! After an accidental edit to a .module file we hit this - there was a space above the <?php tag.

tlthades’s picture

Version: 8.6.0 » 10.0.x-dev

Drupal 8.9.1, Drush 10.2.2
Also encountered an error
[warning] session_id(): Cannot change session id when headers already sent AbstractProxy.php:94
In my custom module there was a space at the very beginning before <?php. After deleting the empty line, the notification disappeared. Thank!

lomale@bluewin.ch’s picture

Version: 10.0.x-dev » 8.1.x-dev
Category: Bug report » Support request
StatusFileSize
new317.18 KB

Hi it's me

MY error was the same under Drupal Drupal 8.9.3, Drush 8.1.15 PHP 7.2

[warning] session_id(): Cannot change session id when headers already sent AbstractProxy.php:94

See Picture - I updated the webform module.

there was a space above the <?php tag.
In my custom module there was a space at the very beginning before <?php. After deleting the empty line,

can someone tell me what I should do. (which module ?? and where ??)

Thanks Lothar