forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: krkeegan on April 15, 2005, 06:49:01 pm

Title: Unable to Login on Subdomain.
Post by: krkeegan on April 15, 2005, 06:49:01 pm
I am running 1.4.x but I don't think this is an issue relating to the devel version.

I have a gallery at:
http://gallery.krkeegan.com
Which is an apache subdomain of:
http://www.krkeegan.com/gallery

All of the pix work fine, but I think I am having a cookie problem. I am unable to login from the subdomain. However from the full address I can log in just fine. I created a test account:
User/Pass = test

I have seen that others had issues to, but I have not seen a resulting answer. I am reasonably sure that my subdomains are setup correctly I am running cPanel 9.x.

Thanks

Kevin
Title: Re: Unable to Login on Subdomain.
Post by: Nibbler on April 15, 2005, 06:55:51 pm
You need to set your cookie domain to .krgeegan.com (manually)
Title: Re: Unable to Login on Subdomain.
Post by: krkeegan on April 16, 2005, 03:08:37 am
Okay I'll bite how do I change my cookie domain? I have looked in the FAQ, DOC, phpAdmin the config table, and searched the board. I am assuming that this is not a configurable setting and needs to be edited in the PHP file. Where can I find this?

Kevin
Title: Re: Unable to Login on Subdomain.
Post by: Nibbler on April 16, 2005, 03:25:08 am
It's part of the new bridge system, so bridge/coppermine.inc.php

Code: [Select]
setcookie( $this->client_id, $this->session_id, time() + (CPG_WEEK*2), $CONFIG['cookie_path'] );
tack the cookie domain on the end

Code: [Select]
setcookie( $this->client_id, $this->session_id, time() + (CPG_WEEK*2), $CONFIG['cookie_path'], '.krgeegan.com');
This is getting dangerously near supporting unsupported software. :)
Title: Re: Unable to Login on Subdomain.
Post by: krkeegan on April 16, 2005, 03:54:25 am
Sorry don't want to get you in trouble.  ;)

But if you are insterested in further conversation it gets even stranger.

I can access everything fine at home, but it is when I am at work that I cannot login from the subdomain. I am running IE6 at home and I think the same at work, but maybe a slightly newer version of IE6. Have any idea why this might happen. At home here I can see the cookie with the subdomain in it so I think that php is handling it fine without any mods.

I'm just interested, I can fend for my self if you want to steer clear of trouble. Just seems strange that two different machines are handling cookies different than each other.

Is my IE6 at work blocking the cookie maybe because it thinks the domain doesn't match?? Strange...

Thanks though for helping someone who wandered off the reservation!
Title: Re: Unable to Login on Subdomain.
Post by: kegobeer on April 16, 2005, 03:29:44 pm
Corporate firewalls may be causing problems.  Try accessing your site from other non-work computers.  You can isolate your problem better that way.