I’m running EE 1.6.8 with MSM.
I’m having an issue with losing session data between pages. The site http://www.planyourcar.com checks the 1st segment of the URL and sets a cookie accordingly. This then changes the telephone number in the top right corner and directs form output to different email addresses.
The segment is stored in a session variable ($branch) using the following code on the index template:
<?php
session_start();
$branch_url = '{segment_1}';
//set the referrer
if (isset($_SERVER['HTTP_REFERER'])) {
$referrer = $_SERVER['HTTP_REFERER'];
}else{
$referrer = "unknown";
}
if (!isset($_SESSION['exp_referrer'])) {
$_SESSION['exp_referrer'] = $referrer;
}
//set the branch vars
if (strlen($branch_url)==0) {
if (!isset($_SESSION['exp_branch'])) {
$branch = 'headoffice';
$_SESSION['exp_branch'] = $branch;
} else {
$branch = $_SESSION['exp_branch'];
}
} else {
$branch = $branch_url;
$_SESSION['exp_branch'] = $branch;
}
// This catches an issue with google where sometimes favicon is passed as a parameter
if ($branch=="favicon.ico") {
$branch="headoffice";
$_SESSION['exp_branch'] = $branch;
}
?>This is then picked up by other templates and voila.
The very strange problem I’m having is this won’t work for one of the main ISP’s here in the U.K (TalkTalk). I thought this may be related to having a server farm server dynamic IP’s (although the session ID is the same between pages) so I switched to cookies and still get the same problem.
I know it’s related to the ISP as I’ve run hundreds of checks over the past week from multiple ISP’s and devices and setup a clean install PC with no anti-virus/security software and everyone who’s on the TalkTalk network doesn’t set the cookie/session variable.
Has anyone get any idea on what might cause this or what I can do?