Reputation: 528
UPDATE:
The site now works on all browsers BUT Chrome now. Which I think is very odd - it's all arisen since the server switched to having an SSL.
As a recommendation I have put this within the application:
ini_set('session.use_trans_sid', true);
ini_set('session.use_cookies', true);
ini_set('session.use_only_cookies', true);
$https = false;
if(isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off') {
$https = true;
}
$dirname = rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
session_name('money');
session_set_cookie_params(0, '/', $_SERVER['HTTP'], $https, true);
session_start();
But still I just can't get the session to set - the application is based around MVC so the controllers are required in depending on the page loaded within the URL.
Could there be an issue with Sessions being passed through required/included files?
Upvotes: 2
Views: 766
Reputation: 28538
HTTP
session ID is not being passed to the HTTPS
session, when you switch between the HTTP
and HTTPS
services on the same server,. You can set it by passing the session ID from HTTP to HTTPS.
You can manage session between HTTP to HTTPS or HTTPS to HTTP:
Upvotes: 0
Reputation: 528
Was to do with a Favicon.ico being requested by chrome - I would never have guessed.
Thanks so much to everyone that helped!
Upvotes: 6