I'm currently working on a system that allows a login over multiple subdomains. Unfortunately all methods i've tried of transferring the UID session (of which the account ID is stored) over does not work. The problem i would like to solve is transferring $_SESSION['UID'];
from its login location at account.domain.co.uk
to domain.co.uk
. I do not however want this session to pass through to all subdomains, just the main domain and account.domain.com. I have a file named init.php which is called before anything else. At the moment the file looks like this:
> // -- initialization file -- //
>
> if ($_SERVER[HTTP_HOST] === 'account.domain.co.uk' || $_SERVER[HTTP_HOST] === 'domain.co.uk') {
> session_name('some_name');
> session_set_cookie_params(0, '/', 'domain.co.uk');
> }
>
> session_start();
The original session is set at account.domain.co.uk. I have also tried:
ini_set('session.cookie_domain', '.domain.co.uk');
but unfortunately that doesn't work either.
All help to get this working will be greatly appriciated, and if any additional information is needed i will be happy to supply. Thanks!
EDIT 1 - Bump for response?