News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Moving Server

Started by Grudge, March 11, 2004, 09:20:52 AM

Previous topic - Next topic

Grudge

For an updated version of this guide look on the doc site


Here is a little document I wrote to assist people who are moving their installation from one server to another. Simply follow the steps below for an easy, stress free move!

•   Put your current forum installation into maintenance mode (forum settings -> Maintenance mode).
•   Download all the files from your current forum folder onto your computer (using an FTP client).
•   Using with the dump database feature of SMF or phpMyAdmin export the contents of your forum database. (In SMF go Admin menu -> Forum Maintenance -> Dump Database -> Dump all). This should save the ENTIRE database of your forum onto a .SQL file on your computer.
•   You are now ready to upload the contents of the directory on your computer to the new server. Upload the complete contents of the directory to the new server.
•   You now need to import the database back into the new server. To do this you will need phpMyAdmin installed on the server, this is often installed for you and is part of cPanel if you have this installed. If using cPanel this can normally be found under "MySQL Databases" then scroll to the bottom and find a link to "phpMyAdmin". From phpMyAdmin select Import and then select browse and browse to the .SQL file you download earlier. Hit OK and the import will begin. Note that on large databases this process may time out. If this is the case open up the .SQL file in an editor and split it up into smaller chunks of around 2MB each. The only thing you must be aware of is that the file must be split at ends of lines (do not split at a part line). In addition if you need to split the file ensure that you import each split file in the correct order.
•   Great! Now you should have the files on the new server and the database imported. However, if you browse to your forum URL you'll notice it doesn't work! This is where the paths recorded in SMF need to be fixed. To do this we have created a nice file called repair_settings.php which can be found in the download section under "Converters and Tools". To use this just upload it to your new forum folder and run it from the browser window by going to: www.yourforum.com/repair_settings.php. After running this file ensure you delete the file off the server to stop others from running it!
•   You should now find everything is working correctly as it was before! If you need to change the web address of the forum (for example moving domain names) ensure you edit Settings.php before you re-upload the files and change $boardurl to point to the URL of the new location.
I'm only a half geek really...

Nitro

#1
i found your article very helpful and clear to follow about how to transfer data form one old MySQL to a new MySQL, however i need to aks you where in the world i can get the phpMyAdmin?

thank you man!

richard

over 72,000 hits in only 4 months, WOW!
I LOVE SMF!!!!!
MPF Rocks!!!

Oldiesmann

http://www.phpmyadmin.net

Most hosts include this software with your hosting account in one form or another (usually built-in to CPanel or Exim depending on which one your host uses).
Michael Eshom
Christian Metal Fans

Nitro

#3
i am going to ask my webhost, that is 1and1.com maybe someone has an opinion about 1and1.com, i  heard some but not related to this subject.
will let you know about my findings.

thank you man!
-richard
MPF Rocks!!!

arnolde

I just did the repair_paths, and when trying to access the forum, I get:

Notice: Undefined index: theme_template_error in /srv/www/vhosts/cardlock.de/smf/Sources/Load.php on line 835

My old forum is: hxxp:robo-store.de/flugsim/smf [nonactive]
My new forum is: hxxp:cardlock.de/smf [nonactive] (second attempt) or hxxp:etadar.de/flugsim.de/smf [nonactive] (first attempt).

I thought maybe https was a problem (etadar.de is not accessable by http) so I tried a different one.

Nitro

#5
Quote from: mrichard on August 19, 2004, 10:37:30 AM
i am going to ask my webhost, that is 1and1.com maybe someone has an opinion about 1and1.com, i  heard some but not related to this subject.
will let you know about my findings.

thank you man!
-richard


i got it fixed while ago, sorry for not being able to post the results here. all i did, i used PUTTY to upload my database. REALLY EASY!
first backed up my old database, then saved it in my computer, renamed the file. uploaded in ROOT from server, ran the PUTTY program to unzip the database file and MAGIC! all my topics and everything were in the new server, just as if nothing happened.
than, i had to run the repair tool, then i had to log on to my admin page and corrected the paths for the avatars and themes, that's it!

thank you so much guys!
-richard
MPF Rocks!!!

arnolde

#6
Okay I realized the I had to carefully check the paths in the bottom half of the screen (repair_paths.php). The first few had aparently been autodetected correctly, so I didnt read on, but some others were not correct, so look carefully!

After making sure all the new paths were correct, I ran repair_paths.php again, and now at least  the forum title page shows up,  but always at the top is displayed:

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/cardlock.de/smf/Sources/Load.php:812) in /srv/www/vhosts/cardlock.de/smf/Sources/Subs.php on line 1598
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/cardlock.de/smf/Sources/Load.php:812) in /srv/www/vhosts/cardlock.de/smf/Sources/Subs.php on line 1599

Also logging in does not work:
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/cardlock.de/smf/Sources/Load.php:812) in /srv/www/vhosts/cardlock.de/smf/Sources/Subs-Auth.php on line 60
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/cardlock.de/smf/Sources/Load.php:812) in /srv/www/vhosts/cardlock.de/smf/Sources/Subs.php on line 1168
(the page ends here)

I'm pretty sure I followed Grudge's migration procedure to the book.

Any more ideas, anyone?

arnolde

Okay, I finally fixed it, it was the "enable output compression".

Damn :-)

Sorry! Must have switched that without noticing.

Too bad though, that it doesnt work!

[Unknown]

Quote from: arnolde on September 07, 2004, 12:36:42 PM
Too bad though, that it doesnt work!

It being?

Remember that repair_settings.php does not change anything when you run it.  If you use it and take the "recommended" values for everything, your forum should work - assuming you save the changes with repair_settings.php.

Just going to repair_settings.php does nothing at all.

-[Unknown]

arnolde

Of course I also clicked on the apply-button at the end of the page, after checking all the parameters :-)
But thanks!

The problem was, I had enabled the compression. My shop system (oscommerce) on the same server successfully uses compression, so I didnt think it would cause a problem.

Maybe thats not really the problem after all, but when I turned it off, the above problems disappeared... so I guess that suits me. Although I would sorta like to have compression, I love to save bandwidth every way I can.

[Unknown]

Try turning it back on; do the problems come back?

-[Unknown]

arnolde

yes, as soon as I "enable compressed output" and apply, the following appears at the top of the screen, followed by the normal display:

Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/cardlock.de/smf/Sources/Load.php:812) in /srv/www/vhosts/cardlock.de/smf/Sources/Subs.php on line 1598
Warning: Cannot modify header information - headers already sent by (output started at /srv/www/vhosts/cardlock.de/smf/Sources/Load.php:812) in /srv/www/vhosts/cardlock.de/smf/Sources/Subs.php on line 1599

Please also note I am using  German language, if that makes any difference.

Ethan

[Unknown]

Your language shouldn't make any difference.  Are you certain you are using an SMF 1.0 RC1 Load.php?  I have the one in the distribution open right in front of me, and Load.php on line 812 - or anywhere near, for that matter - should not be outputting anything.

-[Unknown]

arnolde

No, it is the SMF1Beta5 Load.php.

Sorry I didnt mention that before.

[Unknown]

Well... please upgrade then ;).  This shouldn't be an issue in RC1.

-[Unknown]

Ben_S

Click on the "SQL" link at the top, not the "Query window" thingy.

If you still have problems, post more details
Liverpool FC Forum with 14 million+ posts.

gerrymore

#16
Another problem from me I'm afraid. I followe Grudge's guide as to how to move server. I have run "repair_settings" and accepted the recommended values. But when I go to the forum, it brings up a completely blank page.

Any ideas?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since my origonal post, I have found and used the "repair_paths" file and used it I now get the following error:

Notice: Undefined index: theme_template_error in /home/.sites/132/site21/web/smf/Sources/Load.php on line 900

Now I'm even more stumped.

Any help/ideas welcome

G
SMF RC1, Tiny Portal 0.75, Coppermine 1.3.3, Flashchat.

Ben_S

that .sites in the path looks like it might be it, try using repair_settings.php again it but remove the .
Liverpool FC Forum with 14 million+ posts.

gerrymore

Thanks Ben,

I have tried as you suggested, but no joy. I downloaded the "Sources" folder from the old server again and tried uploading that again as well but the page is still blank. Run "repair_paths again, and still the same error message. The old forum is still on it's server so I know that one  works if taken out of Maint. Mode.
SMF RC1, Tiny Portal 0.75, Coppermine 1.3.3, Flashchat.

[Unknown]

Can you pm me the link to repair_settings.php?

-[Unknown]

Advertisement: