Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot modify header information - headers already sent #689

Open
solracsf opened this issue Jan 13, 2023 · 0 comments
Open

Cannot modify header information - headers already sent #689

solracsf opened this issue Jan 13, 2023 · 0 comments
Labels

Comments

@solracsf
Copy link
Member

On NC 24.0.8, with latest app version (5.1.2):

{
  "reqId": "rwC2CbWZ4phfcLjQujFW",
  "level": 3,
  "time": "2023-01-13T13:51:29+01:00",
  "remoteAddr": "27.11.2.18",
  "user": "--",
  "app": "PHP",
  "method": "POST",
  "url": "/apps/user_saml/saml/acs",
  "message": "Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/apps/user_saml/3rdparty/vendor/onelogin/php-saml/src/Saml2/Response.php:452) at /var/www/nextcloud/lib/private/AppFramework/Http/Output.php#70",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
  "version": "24.0.8.2",
  "exception": {
    "Exception": "Error",
    "Message": "Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/apps/user_saml/3rdparty/vendor/onelogin/php-saml/src/Saml2/Response.php:452) at /var/www/nextcloud/lib/private/AppFramework/Http/Output.php#70",
    "Code": 0,
    "Trace": [
      {
        "function": "onAll",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          2,
          "Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/apps/user_saml/3rdparty/vendor/onelogin/php-saml/src/Saml2/Response.php:452)",
          "/var/www/nextcloud/lib/private/AppFramework/Http/Output.php",
          70
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Output.php",
        "line": 70,
        "function": "header",
        "args": [
          "Content-Length: 0"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 231,
        "function": "setHeader",
        "class": "OC\\AppFramework\\Http\\Output",
        "type": "->",
        "args": [
          "Content-Length: 0"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 298,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\User_SAML\\Controller\\SAMLController",
          "assertionConsumerService",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          [
            "user_saml.SAML.assertionConsumerService"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1030,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/user_saml/saml/acs"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 99,
    "CustomMessage": "--"
  },
  "id": "63c154ce1fe4a"
}

followed by

{
  "reqId": "VOObLzEFXnm13RmPqfmB",
  "level": 3,
  "time": "2023-01-13T13:51:49+01:00",
  "remoteAddr": "21.17.2.18",
  "user": "--",
  "app": "PHP",
  "method": "GET",
  "url": "/apps/user_saml/saml/sls?requesttoken=bf9JX1DN2xR4opGtLR73N9/iX9nEJKRVw12W3GP9X7w%3D:W7kNNj6EriJL9efufUyTda%2BTa%2BzrXsAMihmhkwCJD%2Bk%3D",
  "message": "session_start(): Ignoring session_start() because a session is already active at /var/www/nextcloud/lib/private/Session/Internal.php#208",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
  "version": "24.0.8.2",
  "exception": {
    "Exception": "Error",
    "Message": "session_start(): Ignoring session_start() because a session is already active at /var/www/nextcloud/lib/private/Session/Internal.php#208",
    "Code": 0,
    "Trace": [
      {a
        "function": "onAll",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          8,
          "session_start(): Ignoring session_start() because a session is already active",
          "/var/www/nextcloud/lib/private/Session/Internal.php",
          208
        ]
      },
      {
        "function": "session_start",
        "args": [
          [
            "Lax"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Session/Internal.php",
        "line": 208,
        "function": "call_user_func_array",
        "args": [
          "session_start",
          [
            [
              "Lax"
            ]
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Session/Internal.php",
        "line": 218,
        "function": "invoke",
        "class": "OC\\Session\\Internal",
        "type": "->",
        "args": [
          "session_start",
          [
            [
              "Lax"
            ]
          ],
          true
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Session/Internal.php",
        "line": 106,
        "function": "startSession",
        "class": "OC\\Session\\Internal",
        "type": "->",
        "args": [
          true
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Session/CryptoSessionData.php",
        "line": 149,
        "function": "clear",
        "class": "OC\\Session\\Internal",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/User/Session.php",
        "line": 939,
        "function": "clear",
        "class": "OC\\Session\\CryptoSessionData",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/apps/user_saml/lib/Controller/SAMLController.php",
        "line": 495,
        "function": "logout",
        "class": "OC\\User\\Session",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 225,
        "function": "singleLogoutService",
        "class": "OCA\\User_SAML\\Controller\\SAMLController",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 133,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\User_SAML\\Controller\\SAMLController"
          },
          "singleLogoutService"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 172,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\User_SAML\\Controller\\SAMLController"
          },
          "singleLogoutService"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 298,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\User_SAML\\Controller\\SAMLController",
          "singleLogoutService",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          [
            "user_saml.SAML.singleLogoutService"
          ]
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1030,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/user_saml/saml/sls"
        ]
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
    "Line": 99,
    "CustomMessage": "--"
  },
  "id": "63c154ce1fe1d"
}
@solracsf solracsf added the bug label Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant