session management issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

session management issue

Post by itsmani1 »

For session purpose I am using
session_set_cookie_params(3600, '/', '.mydomain.com');

I have a domain http://www.mydomain.com and also have 2 sub domains test.mydomain.com test1.mydomain.com

I want to carry session between all sections of the website.

when i login on http://www.mydomain.com/login.php it works fine on this but when i move to test.mydoamin.com i can't access session there.

any help?

thank you
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: session management issue

Post by Christopher »

Have you read the user notes on the manual page?

http://us2.php.net/manual/en/function.s ... params.php
(#10850)
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

Re: session management issue

Post by itsmani1 »

yes i read this and thought of

Code: Select all

session_set_cookie_params(3600, '/', '.cmela.com');
session_start()
it works fine if site is accessed with www on FF and IE, but if try to access without www on IE it don't work.
Post Reply