Cannot send session cookie – headers already sent
-
I am a pantheon wordpress user. I have deactivated all of my plugins except for Akismet and reinstalled the plugin. Pagecache is disabled. When I add session_start(); to a page template I get this…
Warning: session_start(): Cannot send session cookie – headers already sent by (output started at /srv/bindings/1fcf4f5101594f719ff351d54bc222aa/code/wp-content/themes/thermal/inc/nav-inc.php:6) in /srv/bindings/1fcf4f5101594f719ff351d54bc222aa/code/wp-content/themes/thermal/page-promo.php on line 55 utid=
Any ideas?
UPDATE: This error is due to session_start() being called from elsewhere in the wordpress core. Session tracking is still not functioning though. Should I be able be able to work with session variables if I just leave out session_start()?
Here is a basic test I am running. I want to get the utid param form the url if it exists, otherwise pull it from the session param…
if (!empty($_GET[‘utid’])) {
$_SESSION[“utid”] = $_GET[‘utid’];
}
echo “utid=”. $_SESSION[“utid”];
- The topic ‘Cannot send session cookie – headers already sent’ is closed to new replies.