Session handling differences between chrome and firefox

Hi,

I am using subdomains to organize logged in  / not.

I have configured the php.ini file within plesk and set
session.save_path = "/var/lib/php/session/wesbite"
session.cookie_domain = "website.com"

Open in new window


In chrome,the redirect to the subdomain is file and the session data is maintained
in firefox, the session data is empty

How can i get the session to be shared amongst all subdomains?
LVL 6
J NUnicorn wranglerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
PHP session cookies as written do not support subdomains.  Read this page to see what to do:  http://php.net/manual/en/function.session-set-cookie-params.php  And read the notes about how subdomains can be a problem.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
J NUnicorn wranglerAuthor Commented:
Hi,

when i used

session.cookie_domain = ".website.com"

still have no luck with firefox
0
Dave BaldwinFixer of ProblemsCommented:
Are you putting that on every page before session_start() ?
0
J NUnicorn wranglerAuthor Commented:
Do i have to set the session params via php and set them in the php.ini file as well?

if i

 print_r(ini_get_all());

i get the following:

  [session.cookie_domain] => Array
        (
            [global_value] => .website.com
            [local_value] => .website.com
            [access] => 1
        )

Open in new window

0
J NUnicorn wranglerAuthor Commented:
Additionally, if it print_r(phpinfo());

i can see that the session cookie domain is set to ".website.com"
0
J NUnicorn wranglerAuthor Commented:
Seems to be no issues with chrome and safari its just firefox
0
J NUnicorn wranglerAuthor Commented:
I lied the session in firefox is empty
0
Dave BaldwinFixer of ProblemsCommented:
You lost me somewhere there.  On my websites, I do not have access to 'php.ini' because the sites are on shared hosting.  I always have to make changes in the PHP pages.  I haven't had to deal with subdomains but I have them one site so I could test it.  Without subdomains, sessions always act the same in all the browsers for me.

If you have it fixed, good.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Plesk

From novice to tech pro — start learning today.