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?

Kindred

you probably want to save the htaccess file in your root directory as well...
but, for the most part, you can restore individual files back to the root if they are needed.

(and in the cache directory, you can delete everything, or just the cache files - the htaccess and index file will be replaced when you extract the upgrade files)




the other directories can be left, since those may have user generated or custom content

and no... don't reupload the old ones...   extract or upload the contents of the upgrade archive.


if it still fails after all that -- do Illori's suggestion
Сл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 got scared... when I was seeing on Filezilla exactly what was being deleted by removing the Sources & Themes directories, I could see a huge amount of customisations.  I had or have rather, Ultimate Profile added - so losing this mod, and anything that was added would be a big loss.

So, I put it back to what it was, re-uploaded the upgrade files with the alterations that were Illori's suggestion, and this time got the error exactly as before only line 3501 I think it was instead for all listed.

I don't think the large upgrade is the best bet for me. So, back round full circle to what I had before, how do I now move from 2.0 RC3 to 2.0.11 via patches? Manual changes? The slow way?

At this moment in time, I would love there to be a simple way to do what I originally wanted!   :-\  Can't I trick the new install, add the old database and use the updater on that one?  Joke!  At least then I could actually see what was missing rather than gulp and think, I can't put that right.  Panic.

Sorry, I feel like I'm wasting everyone's time. It's rather more of a sentimental forum than active and for those reasons, I want to keep it as close to the original as I can but obviously, securer!

Edit: I have removed all the upgrade files - and overwritten potential changed directories until I can fathom this out. Sigh.

Quote from: Kindred on January 12, 2016, 09:55:29 AM

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. :)

This might be what I should be doing, but after all these years... the path ain't so clear oh master!  Can you point me through the brambles?

Illori

there is NO other way to upgrade to 2.0.11 then using the large upgrade package and running the upgrade.php script.

Kindred

yes...   you will be deleting all of those customizations -- in terms of the *FILES*
the DATA for those customizations sits in the database, though...


so, once you finish the upgrade, you reinstall the ultimate profile mod and everything is back the way it was...
Сл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

Illori, you made me believe Santa doesn't exist!  I sat there looking at the archives of all the versions from way back and thought. What a tease? And remembering looking in the mods section before and seeing manual instructions to edit files.

Ok.  Thank you, Kindred. I guess... I will just have to trust they will all mysteriously come back. I hate this! Cruel world. My webhosts are going to love me with all my file transfers!


Kindred

you can use the PATCH upgrade between versions after 2.0 to go from version to the next version, all the way to 2.0.11 --- but you are using an RC version...   there are no patches to upgrade from an RC version to the final release....   therefore, you must do the large upgrade process -- and since you have to do it that way, you might as well jump directly to 2.0.11 rather than 2.0 and then apply 11 patches
Сл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

Darn it!  Thank you both. I gave up on today, got frazzled.  Will attempt again tomorrow. Do appreciate all your help.  If only I'd kept it up till 2.0, eh?  I learn the hard way.  :)

CerebralJam

I tried again today, deleting Sources and Themes, emptying cache, and then I went to the root files that were added. I came across some strange entries that to me look like they relate to my old webhosts and they were cache files. They start off C:\domains\***\www.root\SMF\cache...  From what I can see they relate to a mod for the games. I tried to delete those but got a 'prohibited' response so couldn't.  Tried re-uploading all the directories and files for the upgrader and tested again and got back same sort of error as first time.

The other thing I've noticed is although I've pointed the DNS at the new host - about three weeks now, there are aliases and a gridhosted alias.  Maybe if I get this sorted out, I'll  have some joy! :)


Need to get in touch with new webhosts and find out what's happening in the background.  Back to the drawing board.  Thanks again.

Kindred

Сл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

the cache files are generated by SMF, you really dont need to touch them.

CerebralJam


CerebralJam

Decided to try again.  I do have screenshots but feel a bit vulnerable putting them up here.

This is the information after changing upgrade.php with the patch and after deleting Sources and Themes - this time not touching cache. And of course uploading the whole package again.

Notice: Undefined index: upgrade_upgrade_utility in /.../public_html/SMF/upgrade.php on line 3482
Simple Machines Forum

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

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

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

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

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

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


Notice: Undefined index: upgrade_overall_progress in /.../public_html/SMF/upgrade.php on line 3508

Notice: Undefined index: upgrade_time_elapsed in /.../public_html/SMF/upgrade.php on line 3533
: 0
Notice: Undefined index: upgrade_time_mins in /.../public_html/SMF/upgrade.php on line 3534
, 1
Notice: Undefined index: upgrade_time_secs in /.../public_html/SMF/upgrade.php on line 3534
.
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.

It is not overwriting Packages either, can I safely delete this directory and upload the upgrades?

Kindred

it occurs to me that this might have something to do with the host...   Who is your host?  and how are you uploading the files for 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

Tsohost.  I upload via ftp, using Filezilla. My package is cloud hosted rather than cPanel.

I tried removing Packages and replacing but again got the same errors.  I've put it all back to normal again for now.

One thing that occurs to me about the patch that Illori mentions.  After the site being moved, and using repair-php, I still get an error on certain boards in regard to the theme path. The home page doesn't throw up any error but if I go into Admin I get "The default theme's directory is wrong, please correct it by clicking this text."  I click the text and the paths for the default theme are correct as set exactly the same on the new installation I made and has no problems.  I'm not sure what's happening here. 

I also get this error on Arcade, Calendar, Quiz, Profile, Moderate, Search.   

Home, Help, Messages, Members all fine! Weird.

EDIT: The other thing that I wondered about is in the settings, as my hosts moved the files they set up a database name and user.  I'm ftp'ing as a different user with the same privileges.  Would that make any difference?  Should I change the user and pass in settings to mine or does it make no difference?  I'm looking at it saying login.

CerebralJam

Ok. I'm trying to understand the differences between the two installations.

I am now seeing on my moved settings.php I have the following, obviously, I've edited actual details...

# Note: These directories do not have to be changed unless you move things.

$boarddir = '/public_html/SMF';      # The absolute path to the forum's folder. (not just '.'!)

$sourcedir = '/public_html/SMF/Sources';      # Path to the Sources directory.

$cachedir = '/public_html/SMF/cache';      # Path to the cache directory.



########## Directories/Files ##########

# Note: These directories do not have to be changed unless you move things.

$boarddir = 'C:\\Domains\\...\\wwwroot\\SMF';      # The absolute path to the forum's folder. (not just '.'!)

$sourcedir = 'C:\\Domains\\...\\wwwroot\\SMF\\Sources';      # Path to the Sources directory.

$cachedir = '/wwwroot/SMF/cache';      # Path to the cache directory.

Why do I have two things here?  As in the bit above Directories/Files?


CerebralJam

Hi guys, just wanted to leave a wee update here.

Got in touch with support at my new webhosts - Tsohost. I hope it is ok to acknowledge them here as it would be wrong for me to just say 'sorted'.

They very kindly spent a lot of time and looked through the site/files & database to see what could be the problem.

From what I understand, the upgrader could not find this file: index.template.php   I have a customised theme for my forum.  The upgrader was expecting  the file to be under SMF/default and not SMF/Themes/default.

Support went on to use repair_settings.php to put this right and the upgrader then worked properly. 

I wanted to leave this information here as a thumbs up to anyone who might experience a similar problem.

I am hugely grateful to the support section for all the extra time they put into solving this for me as I didn't have a clue where to start.

Illori, I think you were getting me there in the right direction but obviously not seeing my files couldn't guide me completely on what I needed to change. I didn't know what the upgrader was looking for, or what default files it couldn't find.

Thank you to Kindred and yourself, Illori for responding to my post and helping me where you could.

My forum has now been updated to the latest release and all mods put back in place successfully!  :)

Kindred

ummm... I amg lad you got it sorted...  but I think something is still confused.

smf ALWAYS uses /Themes/default for the default theme.

if, somehow, you deleted or moved the default (curve) theme, then yes, that will cause TONS of issues with the upgrader and many other things.
Сл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 didn't move the Curve theme.  Originally, I probably did worse than that, I renamed it - when I first had the site transferred, I was getting a message about default theme path being wrong so, I... renamed the theme thinking it needs to be the current theme as I remembered changing the default by making a custom theme and well...

If I remember rightly, the next awful thing I did was go into theme settings and er, allow it to try to reset themes... and lost my admin control panel.  I panicked and read a thread on here after searching on how to put that right. Then I think I ran repair_settings.php and got it back again. And renaming the default Curve everything came back better than ever... until I tried to do the upgrade :D

I think as you say, I ballzed it up a bit... even though the theme now looked brilliant it couldn't do the other bits to upgrade.

Having said all that, back when I chose the theme in 2009 (no longer available) not upgraded, it did have strange instructions about where to place files.  And it could even have been back then that I added additional versions of the files to different places thus, duplicates etc because following stuff thinking I got it right - it didn't work, until I placed the files in another place.  Rather than delete stuff (as I  had forgotten what was there originally) I probably kept it where it was.

Somewhere on my external drive - I will have the instructions (and the zipped files) that led me to do this for this theme.  I usually keep everything.

Hangs head in shame...  :-[  I have been a terrible fiddler rather than a careful manual reader. 


Advertisement: