PDA

View Full Version : Moving vbulletin to a new host - the process?


ATVTorture
10-08-2008, 11:29 AM
We're moving our forum to a new host with a new domain name for various reasons. We're using a different domain name just so we can get everything moved over and tested ahead of time without having to bring our forum down. When all is working well with a backup of the database, we'll lock the existing forum down, get a fresh dump of our databases and test again. Once all is well, we'll point the old domain name to the new domain name.

Currently, I have all site files and databases imported on the new domain.

I THINK I have all of the config files for vbulletin and other add-ons pointing correctly to the new host. However, when I tried to load the site up, I get a blank page with a database error on it. It just says Database error: the datbase encountered a problem and then the usual other jargan about trying to refresh or contact the system admin. Does anyone have an idea of what I could have missed or if there's something else I must do to make the site load up?

Thanks!
Buster

vbplusme
10-08-2008, 11:41 AM
When you created the new database, did you use the exact same database name and prefix as well as username and password?

Sounds like maybe you didn't. Check your /includes/config.php file to make sure the database connection parameters are correct for the new site.

Also, you should have received an email with more details about the cause of the error.

HTH

ATVTorture
10-08-2008, 12:04 PM
Yeah I made a point to keep the DB name and password the same to prevent from having to change even more stuff in all of the config files.

I was trying to keep it so all I had to do was change the "DB server name" and the "full path to the forum directory" in config.php.

However, I just opened my config file to assure I didn't have a typo somewhere. I found my DB server name had a space after it before closing the quote and it will now connect, but just gives me a blank white page. When I type the full URL to admincp, it gives me a login prompt. When I enter my login info and submit, I get a blank white page.

Any ideas on that?

Thanks!

--------------- Added 1223475440 at 1223475440 ---------------

OK, here's what I've found but am not sure what I'm missing. I cleared my server log and tried a single time to load the home page of my forum. This is the error that was produced:

PHP Fatal error: (null)() [function.require]: Failed opening required '/home/content/s/a/m/sammythedog/html/global.php' (include_path='.:/usr/local/lib/php-4.4.7/lib/php') in /hermes/web04/b1894/pow.atvtorture/htdocs/forums/global.php(611) : eval()'d code on line 18

The first path referenced is my OLD host, the second path referenced is my NEW host. So, where have I missed updating the path the the forum in the files. I've made the change in config.php and uploaded it to the new host, overwriting the existing file.

Where could I have missed this reference if it's correct in forums/includes/config.php

noppid
10-08-2008, 01:21 PM
Hard coded in a hack?

The second path is where it's running, the first where it's looking. Check the config.php for duplicate lines with the old host info.

ATVTorture
10-08-2008, 01:32 PM
I looked in config just for a portion of the reference to the old host using 'sammy' and found njothing in the current config file on the NEW host.

Where would I begin to look for it being hard-coded in a hacK?

Thanks for your help by the way.

Buster

noppid
10-08-2008, 01:34 PM
Not knowing what hacks you use, I just put that out there because some hacks have that in it. You may not have it at all. But something is afoot.

Are you sure the config.php is being overwritten when you upload?

ATVTorture
10-08-2008, 01:46 PM
Yeah, the datestamp is correct on the one on the server. However, I just FTPed it again just for kicks and get the same error in the log.

IF it were a hack I have, where would I look for it? Meaning in what file(s)?

Thanks!
Buster

noppid
10-08-2008, 02:04 PM
Look at what hacks you have and read the instructions. Like I said, it was an idea, not an absolute.

Search for sammythedog in files and hook code.

ATVTorture
10-08-2008, 02:13 PM
When you say hacks, do you mean items like adding vbgallery or vbportal, or plugins that were installed through admincp?

noppid
10-08-2008, 02:16 PM
Yes, exactly. Sorry, old school talk.

Any add ons, modifications, plug ins or products you added to your forum.

ATVTorture
10-08-2008, 02:22 PM
OK, now I'm gonna show my ignorance. If it's a plug-in that was installed through the admincp, and I can't get into the admincp, how do I find the files that it would be using. Are those just the xml files in the includes/xml folder or will the server path be referenced other places?

Thanks!

noppid
10-08-2008, 02:41 PM
OK, now I'm gonna show my ignorance. If it's a plug-in that was installed through the admincp, and I can't get into the admincp, how do I find the files that it would be using. Are those just the xml files in the includes/xml folder or will the server path be referenced other places?

Thanks!

It could be a setting that gets put in the ACP by an XML, yes. It could be a file edit too.

Use the config.php to turn off the hooks system and try, if it works, it's an installed product. If it dont, it's config.php or a file edit.

ATVTorture
10-08-2008, 02:54 PM
Well, that made the board load. Now I have to download my entire root and do a full text search in PHP and XML files for a piece of the text referencing the old host. YUCK!

--------------- Added 1223481707 at 1223481707 ---------------

However, when I try to login to admincp, it says thanks for logging in and takes me right back to the login screen. I'm guessing b/c cookies are set for the old host through admincp as well as other things. Any ideas?

SEOvB
10-08-2008, 03:25 PM
It sounds as if you've completely bastardized the switching hosts process.
http://hostingreviewshop.com/shared-hosting/host-gator
Things to do on current host:
1. Backup database (make multiple backups for peace of mind)
2. Backup files

Things to do on new host:
1. Restore files
2. Create database and database user(remember the new database name, user, and password)
3. Restore old database.
4. Update includes/config.php with new user/pass/db name if applicable

If you're having problems logging in from cookies. Upload tools.php into the adminCP and fix any issues.

If you are receiving 404 errors, or phpinclude errors, check files to make sure they are all there. If you still receive php include errors. One of your files probably has a path hard coded into the configuration file

Thats all there is to it.

ATVTorture
10-08-2008, 03:32 PM
FDS, not sure what you mean by I've bastardized the process as I have done exactly what you say needed to be done.

I have no 404 errors. I have no phpinclude errors. I simply can't login to the admincp. So, I will use that portion of your post and upload tools.php and see what happens.

Buster

--------------- Added 1223484107 at 1223484107 ---------------

When I go to tools.php in my browser, I get a blank page. Any ideas as to why? Hooks are still turned off in config.

SEOvB
10-08-2008, 04:02 PM
FDS, not sure what you mean by I've bastardized the process as I have done exactly what you say needed to be done.

I have no 404 errors. I have no phpinclude errors. I simply can't login to the admincp. So, I will use that portion of your post and upload tools.php and see what happens.

Buster

--------------- Added 1223484107 at 1223484107 ---------------

When I go to tools.php in my browser, I get a blank page. Any ideas as to why? Hooks are still turned off in config.

Attempt to reupload tools.php check .htaccess file (rare problem).

Backup the includes/xml folder. Remove all exisiting .xml files. Reupload only the vBulletin standard .xml files


Oh and i just wanted to use bastardized in a post today :D

ATVTorture
10-08-2008, 05:00 PM
OK, I did all that and tools.php still loads a blank page. Includes/xml now only has the xml files from 3.7.3SP1. HOWEVER, I can't find the download for vbulletin 3.7.3 that is NOT service pack 1. I don't know if that makes a difference or not but the XML and tools.php file are coming from a download of vb 3.7.3 patch 1.

What would cause that page to load up blank?

SEOvB
10-08-2008, 06:21 PM
Not sure, I'm not real sure of the changes from vB 3.7.3 or earlier to the latest version honestly. However if you're database is version 3.7.3 (or earlier) and you've got 3.7.3PL1 files you should update it just to be up to date.

Also, whenever you login to vBulletin.com/members click download vBulletin you should get a drop down menu (may have to hit something like more options) to where you can select other versions of vBulletin to download (honestly not sure what all versions are there but i assume 3.7.3 is)

ATVTorture
10-08-2008, 06:32 PM
Well I went to vb.com and downloaded the full zip of 3.7.3p1 and ran the upgrade in hop[es it would solve the issue. Still can't get into admin though. says thank for logging in and takes me back to the login prompt. Tools.php still gives just a white screen.

I'm kinda at a loss as to what to do now.

Are the templates that are edited in admincp/styles & templates saved on the server or in a DB? Is the info that was set in admincp regarding cookies stored in a file or in the DB somewhere. If I knew where these items were other than in admincp, I could possibly edit the info there and see if it fixes it.

noppid
10-08-2008, 06:46 PM
Ah ha!

In the ACP, bburl is wrong. I think I changed mine using phpmyadmin last time I screwed up moving a forum. ;)

At least that's how I fixed the login problem in the past. YMMV

ATVTorture
10-08-2008, 07:12 PM
Well I found bburl and cookie domain in the setting table so I updated both of those. However, I still get the same results.

I'm actually able to login to the admin panel and the site now. However, trying to edit templates just gives me an error 403 - Forbidden each time I try to save the template edit.

Any ideas as to what permissions are goofed preventing this access?

Thanks!

--------------- Added 1223517334 at 1223517334 ---------------

Now all of the sudden I can't login to admin again. I login to the forum fine. Admin is back to "thanks for logging in" and it takes me back to a login screen. WTF?!?!?!

Dismounted
10-09-2008, 02:42 AM
Upload tools.php from the do_not_upload directory, and run "Reset Cookie Domain/Path". I believe there is a cache stored, so just editing the settings table would not work.

ATVTorture
10-09-2008, 03:45 AM
I uploaded the file previously. However, when I try to open it, I get a blank white page.

How do i resolve that?

Thanks!
Buster

Dismounted
10-09-2008, 04:39 AM
Make sure you upload it into the admincp directory.

ATVTorture
10-09-2008, 11:32 AM
That is where I have it.

SEOvB
10-09-2008, 03:20 PM
are you getting any other errors besides the white page, or do you have an error log to check to see if the server is throwing an error back to you?

Its strange that tools.php is white, if you've uploaded it a couple times, chances are good it should have worked atleast once...i'd think :D

Do you have mod security or suoshin or whatever its called enabled on the server?

ATVTorture
10-09-2008, 03:58 PM
Well when I looked at the log, I realized the problem. I didn't realize to run tools.php the install fodler had to be in place. So I placed the install folder in the proper place and tools worked. Just not really sure what I'm supposed to be doing with it.

Thanks!
Buster

SEOvB
10-09-2008, 04:09 PM
Reset the cookie path/domain i beleive.

Its been a while since i've been in tools.php so im not sure the exact name of things there anymore

Dismounted
10-10-2008, 05:04 AM
Just not really sure what I'm supposed to be doing with it.

Thanks!
Buster
Upload tools.php from the do_not_upload directory, and run "Reset Cookie Domain/Path".
:).

ATVTorture
10-11-2008, 12:15 AM
OK, before I was just testing. Tonight I've locked my forum down and my new host is currently importing my DB for me due to the size of it.

Exactly what files or folders do I need to re-upload that could have changed over the last few days since my initial copy over to the new host. I know config files would ahve changed but I would rather just update/upload all folders that may have changed.

My forum is set to have atachments stored in the DB so I don't THINK I have an attachments folder to upload. But you pros tell me. I would rather get too much than too little.

Thanks!
Buster

Dismounted
10-11-2008, 04:09 AM
If no attachments, profile pictures, album pictures, or avatars are stored in the file system, you can just upload a fresh copy of the vBulletin files.

ATVTorture
10-11-2008, 05:19 AM
Well I got moved over to the new host and the site loads. However, now I have a couple of small problems that I don't understand:

- my vbportal theme doesn't load. I get a non-portal theme loading
-also, I have a javascript error on every page which on the old host I did NOT have. I'm guessing it's related to the proper theme not loading. If I load the defauylt VB theme, I do not get the js error. So, what would be causing my correct theme from loading from just moving to a new host?

Thanks for any ideas!
Buster

Dismounted
10-11-2008, 10:40 AM
I would try removing the style from the Admin CP, and re-installing it.

ATVTorture
10-11-2008, 01:15 PM
Well I just tried a brand new install of the theme's original source file and it produces the same results.

What other thoughts do you have?

Thanks!
Buster

Dismounted
10-12-2008, 05:16 AM
If the issues do not appear on the default vBulletin style - it is a problem with the custom style, you will have to take it up with the authors of that style, as they may have a solution already.

GreigScott
10-12-2008, 09:19 AM
Moving servers for me was a disaster, i done it yesterday, had to remove all the mods.. then re-install, ugh.

Androgen
10-14-2008, 01:25 AM
I moved to a new server just today.. I am using vB 3.6.11 PL 1 and my website is not small. 6,000+ members, 500,000+ posts and I managed to move to a new server just fine. All I did was:

Old Server:

- Backup Database From old host (SQL Format | Phpmyadmin)
- Backup files from old host (Entire Directory in ZIP format)
- Make a XML Database file backup (phpmyadmin, and also, this comes in handy)

New Server:

- Upload the Zip file and extract everything (Now, everything is the same as it was on old server)
- Created the SAME NAME database (on old server, I had _forum, and on new one, I created _forum) but with different prefixes.
- Created the SAME USER (on old server, I had _user, and on new one, I created _user)
- Imported the database successfully via phpmyadmin
- Edited the Config.php file
- Updated tables (Ran analysis and refresh query)
- The site in now ready again

The downtime was only about 12 minutes for the site.. I dunno how you guys have problem.. well.. everyone has problems. lol

ATVTorture
10-14-2008, 01:46 AM
Well, I had done everything you said. I decided to re-upload my new theme and all my errors went away.

My only problem that I have at this point is that I'm running vbportal. My portal runs fine. However, I can't, to save my life, get the blocks to appear in my forum. the variables are in there, but vb isn't reading them. I can't figure out why VB isn't reading and implementing the variables. For example, vbportal has a header banner ad called $header_banner, and if I remember correctly, and the footer one is called $footer_banner. Nonetheless, VB isn't reading and putting them in the page. I jsut don't understand why. Maybe they're not in vbphrases somewhere, wherever that info is stored.

I just need some input at this point b/c vbportal.com isn't being much help at this point.

Thanks!
Buster

Androgen
10-14-2008, 02:55 AM
Well, I had done everything you said. I decided to re-upload my new theme and all my errors went away.

My only problem that I have at this point is that I'm running vbportal. My portal runs fine. However, I can't, to save my life, get the blocks to appear in my forum. the variables are in there, but vb isn't reading them. I can't figure out why VB isn't reading and implementing the variables. For example, vbportal has a header banner ad called $header_banner, and if I remember correctly, and the footer one is called $footer_banner. Nonetheless, VB isn't reading and putting them in the page. I jsut don't understand why. Maybe they're not in vbphrases somewhere, wherever that info is stored.

I just need some input at this point b/c vbportal.com isn't being much help at this point.

Thanks!
Buster

Hmm... I see.

Perhaps you could do a re-installation of vBPortal? Or perhaps delete any tables in the database and re-insert them? I'm sure that vbPortal has some documentations on how to resolve this manually. If you want, I can take a look at it? Entirely up to you.