Moved webhosts, old board SMF 2.0 RC3 - new installation.

Started by CerebralJam, January 11, 2016, 08:26:23 PM

Previous topic - Next topic

CerebralJam

Hi there.

I recently changed webhosts. On my old hosting I was running SMF 2.0 RC3 with mods added. I didn't get round to upgrading. That time versus, dare I (?)  thing.

On my new webhosts, I want, and have installed the latest board release 2.0.11.  My questions

1) Can I simply add an old database to a new installation using database name/user/pass? I want to keep my boards/membership/posts etc.

I have installed three of the mods from the modifications section and was amazed they had no problems.
2) Will these conflict with the old database when switched?

3) Should I upload images, quizzes, games etc to the new installation before adding the database or other way round? Will it break it either way?

Or should I go into phpmyAdmin and edit anything or Install games/quizzes in the order they seemed to have been installed in the past via their id on the database?

So many questions!

I currently have the old version working - with need of upgrade (which looks like a huge thing to me), or the new installation working, with no membership or posts!  What is best?  Thank you for both your patience and help.  Look forward to your advice.


Sir Osis of Liver

The recommended method is to upgrade the old forum where it is, then move it.  There are other ways to do it (), but however it's done, you shouldn't install any mods or edit any code until you have the production database upgraded and running in the 2.0.11 install.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

CerebralJam

Thank you for your response.  Both the old version of the forum and the new version are now with the new webhosts. I had to move as the old webhosts mysteriously disappeared without contact, all emails bounced back etc. Could see my html pages hosted but not access HELM to gain access to php files or database.  It suddenly appeared again one night last week and so I got my new webhosts to do the migration for me.

By this time, I'd already installed the new version in hope of using a downloaded forum backup. :D  Imagination was there!  But unsure of the technicalities. And of course, over the years I have the original files uploaded/packages etc.

What is the simplest way of upgrading whole package?  Feel like it is a nightmare because of the redesign of theme etc, so many tweaks in past.  And do you have to do it in various stages? Is there no way to upgrade the database without going through all this? (nervous) I know, I'm very ignorant as to the problems both things could cause.  And I do appreciate any help I can get to do this smoothly.






Kindred

you either need to move the RC3 installation and confirm that it works in the new location -- and then do the upgrade
or
do the upgrade in place, confirm that it works -- and then do the move
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CerebralJam

It works in new location.

The old version (2.0 RC3) is up and running in the new location, DNS already sorted. Needing some minor theme tweaks but not doing that - especially if needing to upgrade it all again.

The new latest installation (2.0.11) is also up and running if I want it, in new location, but private.  Can't see it unless I put it public, but can access both versions phpmyAdmin and all files. So I've been switching between the two to sort the theme and check and see if the mods I wanted would run in the newest install and they do. If they didn't then I would have definitely just upgraded the old.

I guess what I'm wanting is a fairly clean install and none of the superfluous uploads I had over the past years, which came with the migration. I didn't want to fiddle with uninstalling/deleting things I thought I'd added in case I made errors and deleted something important. You know what it's like when you first experiment and change your mind.


Kindred

If the rc3 forum works In The new location, then just do the upgrade?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CerebralJam

Hi Kindred, thanks for your reply.  My concern in doing the upgrade as such is when I read " This archive will upgrade/reset your forum to a clean install of the latest version and will remove all modifications."  Considering I first installed my board in 2009, there are many, many tweaks.  I'm thinking of added smileys, theme changes, coding tweaked in mods to make them work...

I'm basically asking, to stop me losing all of this, is there a way to upgrade the database of the old forum, if I can attach it to the new installation and rebuild switching between the two versions and looking at the files individually, checking what I might have done, rather than trying to work it out from memory.

So, I  have a new installation, 'if', I can attach the old database to the new installation, could I run the upgrader there to update the database?  Again, I'm not technically minded so I don't know if it is possible, thus, I haven't tried it!

There looks to have been 16 new releases since my version so patching it looks an awful job too!

I know I'm not very clear in writing what I hope for, but again, not 'doing' until I've gained sufficient advice to understand.

Even running the upgrader, do I upload the upgrade directory and run the upgrade.php from the folder within the directory or do I overwrite all the folders/files including the cache and then run upgrade.php. And does that then upgrade the sql?  I am so lost with this! I don't know how the cache works with the database.  :-[

In reply to Sir Osis earlier. I have now removed all mods from the new install other than the one which seems to be an update.  Happy to add these back later 'if' I can switch and upgrade the old database first?

Illori

there are many changes since SMF 2.0 RC3. you can compare files yes, but due to the number of changes i dont think you will get too far going that way.

you need to upgrade for security and php compatibility. you will end up with clean files that will need mods installed on them.

you override all the existing files with the ones in the large upgrade package. upgrade.php upgrades your database to work with the files you have uploaded. most likely the upgraded database will not work correctly with the old files.

CerebralJam

Will I lose all attachments, individual members uploaded avatars? Stats from mods that were installed such as games scores/quizzes by doing this, or will the database retain all this information?


Kindred

no data will be removed from the database -- members, messages, avatars, etc will be retained (as long as you do not delete the attachments and avatars directories)

If you reinstall the mods at a later date, the data should still be present.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CerebralJam

Thank you... I'm still lost.

In effect, by uploading/overwriting the avatars and attachment directories as you see when unpacking the upgrader - doesn't this delete the older versions?  This is the bit that's getting me.  When I unzip 2-0-11 upgrade, I see folders, attachments, avatars, cache, packages, smileys, sources, themes folders.   Do I upload the whole directory with these still as subs and run upgrade.php in here or do I ftp each folder as I see it directly over top of the existing and then run? I just can't get pass the fact that if I do so, all the existing info will be gone, surely? Obviously, I have a backup of these folders but even so... I know I'm thick!  :D  Thank you for your patience!

EDIT:  I guess it's because I'm starting to understand how to build databases in Access and looking at SQL as being very similar, I start to wonder, about the new install and editing the database copying info over manual - would take forever though probably? And then probably not work, haha! <--- intrigued mind of a novice with stretchy imagination.

Kindred

Access and SQL are ***VERY*** different

and no, there is no good way to manually update the database.

If you are concerned, then upload and overwrite the Subs, Themes and root directories and leave the attachments, avatars and any custom directories alone.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CerebralJam

I'm sorry if I made it sound like Access and SQL are the same, I meant similar as in  tables, fields, queries, ID's, sorting etc. (And I'm still a learner with all that - it's more of a hang on a minute? Moment when I started to look at both) But yeah, what I meant is, I'm now eager to learn SQL as a result. It doesn't look like witchcraft - stand back! :D  It all actually looks amazing as to what it can do.

Right, guess I'm going to have to make some losses somewhere. And bite the bullet so to speak. I do have downloaded all the original files so at the very worse...

Thank you.  I'll let you know when matter is solved.  I'll be amazed if it runs smoothly, but thrilled beyond relief if it does.


Kindred

remember -- get a backup of your files *AND* database (separate things) before you start.
If you have that, then anything can be restored and you can try again.

I have a site which has been upgraded from 1.0, through the updates, and then up to 1.1 and though much of the 1.1x  series, up to 2.0 beta and through the RCs, final and security updates and is now running 2.1 beta...   all of the data from the original forum is still there. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

CerebralJam

Uh-oh... HELP!!!!  :o I got a screwed up screen with undefined index errors in upgrade.php

Notice: Undefined index: upgrade_progress in /.../public_html/SMF/upgrade.php on line 3488

Notice: Undefined index: upgrade_step in /.../public_html/SMF/upgrade.php on line 3493
1: Login

Notice: Undefined index: upgrade_step in /.../public_html/SMF/upgrade.php on line 3493
2: Upgrade Options

Notice: Undefined index: upgrade_step in /.../public_html/SMF/upgrade.php on line 3493
3: Backup

Notice: Undefined index: upgrade_step in /.../public_html/SMF/upgrade.php on line 3493
4: Database Changes

Notice: Undefined index: upgrade_step in /.../public_html/SMF/upgrade.php on line 3493
5: Delete Upgrade

Updating Your SMF Install!
The upgrader was unable to find some crucial files.

Please make sure you uploaded all of the files included in the package, including the Themes, Sources, and other directories.

I uploaded everything!  What've I done!?

Illori


CerebralJam

#16
When the board was originally moved yes, and it fixed an issue, but deleted this file afterwards.

When I checked the url, it showed me, number 1, a number next to my profile pic up top right, and update.php!!!  Not in maintenance mode. All the forum buttons had gone. I have switched over and put private.  Can you tell me what has happened and how I alter this?  What should I do now to a) get the upgrader to work, or b) change it back!?

Quote from: Illori on January 12, 2016, 11:02:53 AM
did you run repair_settings.php?

I did answer this, but not sure if you are now suggesting that I run it or asking if I have run it at some time or other? Can you clarify your comment?


Kindred

you can restore the forum to pre-upgrade attempt by restoring the FILES and DATABASE backups that you took before you started...

I suspect that, when you uploaded the upgrade files, it did not actually overwrite the existing files...


so - to that end.
Delete Sources directory
Delete Themes directory
Delete all files in the root folder, with the exception of Settings.php and Settings_bak.php
Clear the cache directory

upload the files and directories from the large upgrade archive once more

then try running upgrade.php
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Illori

actually i dont think that is the issue. i think it is similar to this one

Quote from: margarett on May 25, 2015, 07:37:03 AM
OK, here it is.

Open upgrade.php, (in function loadEssentialData):
Find:
global $modSettings, $sourcedir, $smcFunc, $upcontext;
Replace with:
global $modSettings, $sourcedir, $smcFunc, $upcontext, $boarddir, $boardurl;

Find:
// If they don't have the file, they're going to get a warning anyway so we won't need to clean request vars.
Add before:
//Lets overwrite the theme data because it can be wrong...
if (!isset($modSettings['theme_dir']) || (isset($modSettings['theme_dir']) && !file_exists($modSettings['theme_dir'] . '/languages/Install.' . $upcontext['language'] . '.php'))) //Wrong themes dir. Duh!
{
$modSettings['theme_dir'] = $boarddir . '/Themes/default';
$modSettings['images_url'] = $boardurl . 'Themes/default/images';
$modSettings['theme_url'] = $boardurl . 'Themes/default';
}


This will allow you to run the upgrade tool without problems. Nevertheless, the paths will STILL be wrong in the database. So, when you finish the upgrade, you need to load and run repair_settings to properly fix the paths, before you can use 2.0 ;)

can you try that patch and see if you can run upgrade.php now?

any custom themes you were using will need to updated/upgraded to work with SMF 2.0.11.

CerebralJam

Ok,  :laugh: Now, I'm worried as I have two answers.

When I check in the uploaded folders, it seems all the old files are still there even though I instructed to overwrite - (and the permissions look right) a good example of this is the cache for quick reference.

Ok. Noted your information about deleting sources and themes directory and all files in root with exception Settings.php and Settings_bak.php, clear cache directory... in here I have a few logs htaccess and index.php - when you say, 'clear' do you mean, 'delete' these items? Or is there another way to clear them?

Also keep other directories? attachments, avatars, packages, smileys?  There are a lot of other files in the root, should I only be deleting the ones that are named the same as the ones I am uploading in the installer.

I got as far as deleting Themes and Sources and nothing else so far... should I now be reuploading the old Sources and Themes back up or uploading the upgrade ones again?  ARGGGH.

Or... should I be trying the other suggestion just made?

Advertisement: