Ask us if you have any question about PHP, MySQL, Apache,
Linux or optimizing your website for quick answers!!!

PHP sessions across subdomains

If you are facing problems sharing sessions across subdomains, use the following code before session_start().

ini_set ( 'session.cookie_domain', '.mysite.com' );

Replace mysite.com with your domain name.

Comments