---
title: "Troubleshooting \"Cannot modify header information - headers already sent\" Errors"
date: "2022-03-04T23:58:45+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94076-troubleshooting-cannot-modify-header-information-headers-already-sent-errors"
id: "c3f015dd-c7ee-43ab-b50f-710648a1dd2b"
---

**Issue**
---------

Single Sign-On (SSO) may suddenly stop working, and errors in the logs like this may appear:

    Warning: Cannot modify header information - headers already sent by (output started at /mnt/www/html/example/vendor/symfony/http-foundation/Response.php:377) in Drupal\simplesamlphp_auth\Controller\SimplesamlphpAuthController->authenticate() (line 197 of /mnt/www/html/example/docroot/modules/contrib/simplesamlphp_auth/src/Controller/SimplesamlphpAuthController.php)

**Resolution**
--------------

If you're encountering this on all of your environments, then it's possibly related to code, specifically a module you might have enabled recently. Though the above is specific to SimpleSAML, [a post on Drupal's Stack Exchange for troubleshooting an issue like this in general recommends](https://drupal.stackexchange.com/questions/131637/no-one-can-login-and-access-denied-message) disabling/uninstalling the most recently installed modules until you can isolate which module is at play. Even if it seems unlikely that a module is at play, disable it to at least rule it out as a cause. If you're able to re-enable the modules you absolutely need and logging in works, then do the same thing in the production environment.

The SimpleSAML project on Drupal.org has [an issue discussing the order in which headers are sent to the client](https://www.drupal.org/project/simplesamlphp_auth/issues/3052206), with patches that propose to address the issue. Try that if the disabling/re-enabling modules approach doesn't work.