Page 1 of 1

A small problem...localhost login takes me to my online phpb

Posted: Wed Sep 14, 2005 1:45 am
by PHPMagic
A few days ago I decided to update my localhost phpbb2 with a mysql database backup of my online phpbb2 forums. I backed up my online phpbb database using phpmyadmin, then sql queried it to my localhost phpbb database using my localhost phpmyadmin. This of course updated my localhost version to reflect my online version. But, when I log in to my localhost version and click on admin panel it takes me straight to my online version (index only) instead of staying on the localhost. How do I fix this?
I was thinking a possibility was changing the domain name that's located in the admin panel if its located in the database, but I'm not sure if this would work.

Posted: Wed Sep 14, 2005 1:47 am
by tweakphpBB
You need to edit the domain name in the admin cp on your local host, but since you can not login on your localhost (since it directs you to your online one) you'll need to edit it manually in the database. :)

Posted: Wed Sep 14, 2005 2:00 am
by tahoebuff
Alternatively, you can use starfoxtj's Admin Toolkit

Tahoebuff

Posted: Wed Sep 14, 2005 3:55 am
by PHPMagic
I went into phpmyadmin on localhost and had a look at the phpbb db. I found 'server name' and changed it from my domain name to 'localhost'. I went back to my forum index on my localhost and clicked login. I entered my information and clicked login and then I get a page missing error. I also tried it like http://localhost, and http://localhost/mysite and also http://localhost/mysite/forum and non of them worked. They all do the same thing.

Posted: Wed Sep 14, 2005 4:42 am
by Lumpy Burgertushie
PHPMagic wrote: I went into phpmyadmin on localhost and had a look at the phpbb db. I found 'server name' and changed it from my domain name to 'localhost'. I went back to my forum index on my localhost and clicked login. I entered my information and clicked login and then I get a page missing error. I also tried it like http://localhost, and http://localhost/mysite and also http://localhost/mysite/forum and non of them worked. They all do the same thing.

server_name (domain name in the admin panel ) should be your domain name

youdomain.com

not http://www.yourdomain.com

that is not a domain name, it is a url

yourdomain.com is a domain name.

try that, and it will work.


robert

Posted: Wed Sep 14, 2005 5:07 am
by phantomk
Check to see if the scripts path is correct, as I suspect your online forum is something like http://www.domain.com/forums/ and your localhost is on the root of the site.

@Lumpy do you actually read the posts ? I have seen you post several times comeing in from way out of left field about something that kind of relates, but has nothing to do with what the user actually wants.

Posted: Wed Sep 14, 2005 5:19 am
by Lumpy Burgertushie
phantomk wrote: Check to see if the scripts path is correct, as I suspect your online forum is something like http://www.domain.com/forums/ and your localhost is on the root of the site.

@Lumpy do you actually read the posts ? I have seen you post several times comeing in from way out of left field about something that kind of relates, but has nothing to do with what the user actually wants.


maybe you should read the post.

the problem is very clearly that the domain name for the live board is in the database for the local board , that is what is causing it to redirect to the online board.

he said he tried to reset it but was doing it wrong.
I went into phpmyadmin on localhost and had a look at the phpbb db. I found 'server name' and changed it from my domain name to 'localhost'. I went back to my forum index on my localhost and clicked login. I entered my information and clicked login and then I get a page missing error. I also tried it like http://localhost, and http://localhost/mysite and also http://localhost/mysite/forum and non of them worked. They all do the same thing.

now, my post was entirely appropriate to the situation.


what are you talking about?

robert
edit:

I doubt that you can find a post by me that is not on topic . or that is not pretty close to being the correct advice.



robert

Posted: Wed Sep 14, 2005 5:23 am
by phantomk
Lumpy Burgertushie wrote: he said he tried to reset it but was doing it wrong.
I went into phpmyadmin on localhost and had a look at the phpbb db. I found 'server name' and changed it from my domain name to 'localhost'. I went back to my forum index on my localhost and clicked login. I entered my information and clicked login and then I get a page missing error. I also tried it like http://localhost, and http://localhost/mysite and also http://localhost/mysite/forum and non of them worked. They all do the same thing.

now, my post was entirely appropriate to the situation.


what are you talking about?

robert

I went into phpmyadmin on localhost and had a look at the phpbb db.

I found 'server name' and changed it from my domain name to 'localhost'.


I don't want to start anything, was just asking since you know what your talking about, you just don't seem to read all the posts properly.

Posted: Wed Sep 14, 2005 5:32 am
by Lumpy Burgertushie
ok, let's get this cleared up.

in your database, in the config table, there is a field called "server_name"

when you are in the admin panel of your board, the domain name box is what affects that server_name field of the database.

if you put anything other than your domain name in that field you will have problems.

you can't put "localhost" , also, you can't put http://www. in it.

the script adds http:// to whatever you put in that box, therefore , your IE browser will redirect you to micorsoft usually, but it may just give you a blank page or a page not found error, firefox will do the same thing.
therefore, don't put it into the box for domain name.

my comment about what is and what isn't a domain name is appropriate,

http://www.domain.com is not a domain name, it is a url

www is not necessary either, but it really doesn't matter if you use it or not as long as you are consistent.

now, if you read the complete post that I quoted, you will see that he tried several different things in the domain name field in his admin panel, none of them worked , for the reasons I have listed.

now,
what part of this is not on topic or correct advice?

luck,
robert

Posted: Wed Sep 14, 2005 5:35 am
by phantomk
He is trying to setup the database on his localhost server. And the domain would be localhost. If he was talking about his live server, you are correct on your post suggestions. But they are not. It has nothing to do with his live server, he wants to properly finish loading his live servers database onto his localhost's database.

Posted: Wed Sep 14, 2005 5:44 am
by Lumpy Burgertushie
OK, I wasn't thinking about the localhost thing, but everything else applies.

don't use localhost, use the IP address of your machine
127.0.0.1 don't use http:// in that either.
that is what I have on mine and it works just fine.

robert

Posted: Wed Sep 14, 2005 6:22 pm
by PHPMagic
lol... I'm sorry, but you guys are funny. I'm about to give the IP a try.

Posted: Wed Sep 14, 2005 6:26 pm
by PHPMagic
I tried my IP address and I still got the page missing error after trying to login.