Forum Moderators: coopster

Message Too Old, No Replies

Issue with PHP Session, subdomain and IE

PHP Session, _ subdomain, IE

         

himmal

1:11 am on Jan 6, 2009 (gmt 0)

10+ Year Member



One of my subdomains with _ is giving session problem in IE
My site has subdomains. All the sub domains are single word except one, which has an _ in it. The php session is transferred between the subdomains without any errors both in Firefox and IE except for the one subdomains with the "_". The subdomain with the "_" works in Firefox but does not work with IE. The reason is: everytime the page loads in IE the subdomain with "_" registers and new php session id. I cannot stop it from registering the new session id. Can anyone of you know how to solve this problem or have good advice

P.S.: I need to use _ in my sub-domain. Removing _ is not an option.

Thanks

Here are some details

Example:
www.mywebsite.com -> Session works
mydomain.mywebsite.com -> Session works
my_domain.mywebsite.com -> Session does not work in IE

I also have this code in .htaccess
php_value session.cookie_domain ".mywebsite.com" which

IanKelley

1:21 am on Jan 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The reason for this is that the underscore character is not allowed in domain names. IE has issues with it because, ironically, they are being standards compliant. Firefox is more forgiving in this case.

Pico_Train

4:59 am on Jan 6, 2009 (gmt 0)

10+ Year Member



IanKelley is right, it's the underscore.

himmal

8:45 pm on Jan 6, 2009 (gmt 0)

10+ Year Member



Thanks guys..

I guess I have no choice but to remove the _ :(

mcavic

9:04 pm on Jan 6, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A dash should work, though.