1

Topic: After moving from one domain to another, login doesn't work anymore

See also: Can't login

I tried deleting my cookies and setting different cookie domain as suggested in other posts, but no luck.

For test purposes I had the forum in a sub sub dir of another website until I got my new domain. I pointed the domain to the installed dir, and changed the BASE_URL and now I cannot log-in anymore.

I can still log in through the old site. (after I reset the cookie domain)

I'm confused. Again, I get login successful/redirecting and then the message you are not logged in. This happens not just for admin, but also for other users.

Running version 1.1.3.

Thanks for any and all help.
James

2

Re: After moving from one domain to another, login doesn't work anymore

Question: could mySQL localhost have something to do with it? Hmmm, no not logical, since the login seems to work.
James

Re: After moving from one domain to another, login doesn't work anymore

One thing before we continue. Does that only happen in Internet Explorer? Try logging in with a different browser.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: After moving from one domain to another, login doesn't work anymore

Tried with NetScape and that works fine.

That means you have an idea of what it might be big_smile

JJ

5 (edited by jjc 2004-04-27 16:48)

Re: After moving from one domain to another, login doesn't work anymore

Rickard,
Well I found out why NetScape works and IE doesn't....
It seems to be having to do something with domain. Netscape sets the cookie even though it comes from domain one, with domain name two. (1st = www.emforum.nl, 2nd = www.groove.nl)

So the cookie gets set from www.emforum.nl but with domain www.groove.nl (don't know why). NetScape is fine with that, however, IE does not allow it and doesn't set the cookie. (ouch!)

Only thing I can think of now, is to install again under a separate webserver. (Or see if my provider can do something for me)

I'll keep you posted for your FAQ.
JJ

Re: After moving from one domain to another, login doesn't work anymore

Which one of the domain do you want to use? You can't use one domain and set a cookie for the other. IE correctly regards that as a third party cookie and they are not allowed by default.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

7 (edited by jjc 2004-04-27 20:33)

Re: After moving from one domain to another, login doesn't work anymore

I understand, but that is not the case. It must be my provider running PHP within one Domain, which sets the cookie domain to the wrong domain name.

Anyway, I asked them to fix it.
Thanks,
JJ

Re: After moving from one domain to another, login doesn't work anymore

Hmm, ok. It really shouldn't have anything to do with your provider. It almost sounds as if both emforum.nl and groove.nl point to the same forum. In that case you will have to do a hack in PunBB to get it to detect the current domain name in use by the visitor and set the cookie accordingly.

What do you have $cookie_domain set to in your config.php?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

9

Re: After moving from one domain to another, login doesn't work anymore

nothing. I tried both other sites as well, but it is the internal conflict in IE that prevents it from setting the cookie. And no I only want to be on domain 1. No user should ever come in through domain 2. That was just for testing purposes.

Perhaps I should remove it from the directory under the other domain, and move it into it's own directory. Re-install? We'll see.

Thanks for your thoughts so far though, you're very responsive I appreciate that. A lot. big_smile

JJ

Re: After moving from one domain to another, login doesn't work anymore

You didn't answer my question :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

11

Re: After moving from one domain to another, login doesn't work anymore

I did. First word in the reply. It is set to nothing, and I tried setting it to either of the domain names as well.

smile

Re: After moving from one domain to another, login doesn't work anymore

Try

$cookie_domain = '.groove.nl';

or

$cookie_domain = '.emforum.nl';

"Programming is like sex: one mistake and you have to support it for the rest of your life."

13

Re: After moving from one domain to another, login doesn't work anymore

I tried both before, and just now. Doesn't work.
What IE dislikes is the fact that I'm on .emforum.nl, but it tries to set a cookie as (<name>@groove.txt) groove.nl.

That's the conflict and I can only solve that by making the server unambiguous I think.

JJ

Re: After moving from one domain to another, login doesn't work anymore

But that's impossible. If you've set the cookie domain to .emforum.nl it will attempt to set the cookie for that domain. It should only fail if you have one domain in your config.php and visit the forums by entering a different domain in your browsers address bar.

Could you paste the URL's to the two forums directly so we can have a look?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: After moving from one domain to another, login doesn't work anymore

Ok, here's how it is. You can't have two different domains for the same forum without doing some hacking of the source. The problem is that if you don't specify a $cookie_domain it will use the default cookie domain which is the hostname of the server that attempted to set the cookie. So if you have both groove.nl and emforum.nl pointing to the same forum, you're screwed unless you implement some code that will detect the domain by which the forum is visited and set the cookie domain thereafter.

Now, here's my question. Why have two different domains for the same forum?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

16

Re: After moving from one domain to another, login doesn't work anymore

Rickard wrote:

Now, here's my question. Why have two different domains for the same forum?

While we requested the new domain name (emforum.nl) we tested with an existing domain (groove.nl). When the new domain was registered and functional we wanted to switch and not use the old/test one anymore. That turned out not to work at all.

Even changing the $cookie_domain doesn't work. I will just start from scratch with everything and we'll see where we end up.

We really appreciate your responsiveness though. Just wanted to have that said.
It just proofs that choosing punBB was the best choice to make, for that alone I can highly recommend you guys!!! (And the forum itself is already awesome big_smile )

JJ

17

Re: After moving from one domain to another, login doesn't work anymore

Just to complete the thread for posterity

After moving the forum into it's own directory under the URL, everything works fine. I could even just copy all the files and voila, it worked!!!

Thanks Rickard for your help.