• Resolved tomlandis

    (@tomlandis)


    I am getting the error below, not too sure why. My code says:

    if (!isset($_SESSION)) if (session_start());

    (This is triggered by a snippet.)
    —-
    ERROR:

    Warning: Cannot modify header information – headers already sent by (output started at /opt/bitnami/apps/wordpress/htdocs/wp-includes/formatting.php:5079) in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-native-php-sessions/callbacks.php on line 35

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tomlandis

    (@tomlandis)

    Accidental double-post, sorry

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    Hi @tomlandis,

    Can you share the snippet of code you’re using to start the session? What WordPress action is it being called on?

    Also, can you try reproducing the issue in a non-Bitnami environment to see if it might be specific to your environment?

    Thread Starter tomlandis

    (@tomlandis)

    Hi Daniel,

    The snippet is [phpinclude file='/opt/bitnami/apache2/htdocs/abc/index.php'] which is a simple plugin that includes the file. It is triggered in the body of the page.

    And index.php contains the line:

    if (!isset($_SESSION)) session_start();

    I’m afraid that I can’t try to replicate that outside of Bitnami as I haven’t set up a non Bitnami server. Do you think it’s linked to the environment? Bitnami is a very simple LAMP setup though. I find it surprising.

    Thanks for the plugin, and the support!

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    Yes, I think it’s linked to the environment, either Bitnami specifically or some other aspect of your configuration. Let me know if you track down specific reproduction steps.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Cannot modify headers information’ is closed to new replies.