• Hi,

    I have previously used Geo Redirect successfully, but went through a phase of not needing the redirect function.

    I am now trying to reactivate the plugin, as I now have multiple languages on my site, but this error keeps being returned and prevents my whole site from working:

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/66/10542066/html/wp-content/plugins/geographical-redirect/geoip/geoip.inc:1567) in /home/content/66/10542066/html/wp-content/plugins/geographical-redirect/geo-redirect.php on line 253

    Lines 249-255 are:

    249   private function redirectTo($to)
    250   {
    251        $this->beforeRedirect();
    252        $to = $this->sanitizeRedirect($to);
    253        header("Location: " . $to);
    254        exit;
    255   }

    I using WordPress Multi-Language (WPML) and I know that that has a redirect function based on browser language, but I do not want to use that, I need location based redirect. From reading the other support posts, I notice that there may be a conflict between WPML’s redirect code and Geo Redirect’s.

    The crazy thing is that even when I deactivate ALL plugins I have and activate ONLY Geo Redirect, the error persists, which confuses me as I thought this would normally avoid a conflict like this.

    Any help would be much appreciated!

    Thanks,
    Richard

    https://www.ads-software.com/plugins/geographical-redirect/

Viewing 1 replies (of 1 total)
  • Thread Starter velopex

    (@velopex)

    Further to my post above,

    When all plugins are activate as normal an I then activate Geo Redirect, the following text is shown as a yellow notification at the top of the plugin screen…:

    The plugin generated 3 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    …And the following error is returned at the very top of the same browser window:

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/content/66/10542066/html/wp-content/plugins/geographical-redirect/geoip/geoip.inc:1567) in /home/content/66/10542066/html/wp-content/plugins/woocommerce_barclaycardcw/admin.php on line 45

    Lines 43-47 are:

    43   if (!session_id()) {
    44
    45   session_start();
    46
    47   }

    Just some more context.

    Thanks,
    Richard

Viewing 1 replies (of 1 total)
  • The topic ‘Geo Redirect Error: "Cannot modify headers – Headers already sent"’ is closed to new replies.