November 24, 2008

How to maintain session between Domain and subdomain in php

When Url is got changed we are unable to continue with solution. What some case we require it like subdomain feature.... right??

Here is the solution ...


You need to find a php.ini and edit it. Maybe ask you host, if they could send their standard php.ini to you.

After they've done that (or you've found one), you'll need to find the line where it says:
session.cookie_domain, and change it's value to session.cookie_domain = ".MainDomain.com"

Then upload to your root, and try again.