PDA

View Full Version : Server move to localhost - can't log in


Exeter
04-19-2013, 05:24 AM
I am trying to move my entire forum instance to a test server (localhost).

I completed the move per instructions here:
http://www.vbulletin.com/docs/html/moving_servers

Login in attempts on localhost result in redirection to production (the source), which returns
"Invalid Redirect URL (http://localhost/)".

Next I replaced every instance of the URL I could find in the table settings with localhost.
That did not work either. Resetting the cookiedomain with tools.php did not do it either.

What am I missing?
Is there a proper server move doc somewhere; one better than the fake-out on the official server?

Thanks

--------------- Added 1366356494 at 1366356494 ---------------

I narrowed the issue down to some setting in the DB image.

Doing a find/replace of "www.example.com" => "localhost" in the dump file before importing makes the install work.

Unfortunately there are thousands of those references. Don't know which one made it work.
Replacing all may have some unintended consequences, such as all forum links in posts changing.

Lynne
04-19-2013, 02:49 PM
All you should need to do is on the live site, turn off forum, change AdminCP > Settings > Options > Site Name/URL/etc > Forum URL > set to localhost > do database backup. (Change back to live url and turn live site back on). Now, use that database backup that has the fixed URL. You may need to upload tools.php and click to reset the cookie domain if you have that set to the domain instead of just left blank.

Exeter
04-20-2013, 04:50 AM
Thanks for the info. I'll try that next time.

patracy
09-19-2013, 03:57 PM
All you should need to do is on the live site, turn off forum, change AdminCP > Settings > Options > Site Name/URL/etc > Forum URL > set to localhost > do database backup. (Change back to live url and turn live site back on). Now, use that database backup that has the fixed URL. You may need to upload tools.php and click to reset the cookie domain if you have that set to the domain instead of just left blank.

Ok, so I tried this on my forum. When I imported it over to the new server. The domain name is trying to ad a /localhost/ into the address bar after the server IP address. So this didn't work for me either. I guess I need to do another export with the normal/working settings of the live site. The upload tools.php and manually update them there?

Lynne
09-19-2013, 05:27 PM
What did you enter as the Forum URL before you did the backup? And what is the URL you put into your browser to view your localhost site?

patracy
09-19-2013, 05:34 PM
"localhost" is what I put in there. I don't have a url for the new site. Just the IP of the new server for now.

--------------- Added 1379615777 at 1379615777 ---------------

When I tried logging in basically I got:

http://xxx.xxx.xxx.xxx/localhost/forum.php as the domain link up top.

I'm pulling down a new backup with the normal domain from the live server now and will upload it shortly to the new server. I'm guessing tools.php is the way to go?

Lynne
09-19-2013, 05:42 PM
You need to enter the URL you will be using for the test site - if it's an IP, then http://123.456.789.123

patracy
09-19-2013, 05:49 PM
You need to enter the URL you will be using for the test site - if it's an IP, then http://123.456.789.123

But if I do that to live, won't I break the live site?

--------------- Added 1379616805 at 1379616805 ---------------

And on another note, could I just go into the database and update the datastore table under options value and replace anything that had the live forums domain name with http://123.456.789.123 ?

Lynne
09-19-2013, 08:52 PM
But if I do that to live, won't I break the live site?

No, not if you also did this which I wrote:
***
(Change back to live url and turn live site back on)
***



And on another note, could I just go into the database and update the datastore table under options value and replace anything that had the live forums domain name with http://123.456.789.123 ?
If you know how to deal with serialized data, then sure you can do that. If you don't know how to deal with serialized data, then you could break your site doing this so make sure you make a copy of the data before changing it.

patracy
09-20-2013, 01:14 AM
I figured out another work around. My browsers were using the cached address. So I went to another machine I've never used to access the site and edit the host file on it with entires for both www.mydomainname.com and mydomainname.com. I confirmed it only knew of these by pinging from command line. Then I used the browser and connected to the site as though I was going to the "live" site. I was able to log in no problem. I then changed the settings you mentioned to http://123.456.789.123. Went back out and edited my host file back out. And I'm able to access the site no problem now via IP address!

Now on to getting the ad system, mailer system, and a few other things running. Thanks for the help.