Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: WhiteJC on March 27, 2023, 06:53:04 AM

Title: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 06:53:04 AM
I've ftp'd the smf_2-1-3_upgrade directory to my packages directory

Permissions set to 755 for Packages, 775 for smf_2-1-3_upgrade

When I try to run upgrade.php all I get is a white page with "Forbidden" written on it

what do I need to do to allow me to run the upgrade?
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Arantor on March 27, 2023, 07:16:58 AM
You don't run it from the packages directory, it's not a package.

You roll all the files over the top of your existing SMF files (backup first!) and then run upgrade.
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 08:09:10 AM
I've uploaded the upgrade files to my forum directory however when I try to run the upgrade I get this message...

The directory: /home1/frienfg5/public_html/forum/avatars has to be writable to continue the upgrade. Please make sure permissions are correctly set to allow this.

the avatar directory is set to 775
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Doug Heffernan on March 27, 2023, 10:40:36 AM
Can you try to chmod it to 777 and see if it would help?

For more on chmod please see this link:

https://wiki.simplemachines.org/smf/Chmod
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 11:25:32 AM
Quote from: Doug Heffernan on March 27, 2023, 10:40:36 AMCan you try to chmod it to 777 and see if it would help?

For more on chmod please see this link:

https://wiki.simplemachines.org/smf/Chmod

still the same
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 12:09:05 PM
now its back to the "Forbidden" screen
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 12:14:07 PM
changing the forum directory chmod back to 775 gives this error:
The directory: /home1/frienfg5/public_html/forum/avatars has to be writable to continue the upgrade. Please make sure permissions are correctly set to allow this.

the avatar directory chmod is 777
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Arantor on March 27, 2023, 12:18:07 PM
Then avatars probably needs to be 775 as well.
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 05:31:56 PM
Ive set avatars to 775 and this is the screen I get...

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.friendsoffulham.com%2Fwordpress%2Fwp-content%2Fuploads%2F2023%2F03%2Fupgrade01.png&hash=ffd76071c5102bc205ec1c32113e3450f4ff9f60)
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Steve on March 27, 2023, 06:17:41 PM
Can you add that image as an attachment so we (I) can see it more clearly?
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 27, 2023, 06:40:51 PM
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.friendsoffulham.com%2Fwordpress%2Fwp-content%2Fuploads%2F2023%2F03%2Fupgrade02.png&hash=46dfa7904a104e9fb74350209deffb58c221afec)

open image for a larger view
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 28, 2023, 05:24:34 AM
this is obviously(?) a permissions issue?
my hosting provider has a utility were I can install a "new" SMF forum, either 2.0.19 or 2.1.3.

as I've back-ups of the databases could I install 2.1.3 and then restore some of the database(s), I want to keep members, passwords, messages, different forums etc.

is this a good idea? and if so are these the database(s) I need to restore?
smf_admin_info_files
smf_ban_groups
smf_ban_items
smf_log_boards
smf_log_packages
smf_log_topics
smf_membergroups
smf_members
smf_messages
smf_moderators
smf_pm_rules
smf_topics

Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Arantor on March 28, 2023, 05:41:10 AM
Do everything or nothing, trying to do it piecemeal is usually a recipe for disaster.

I'm not sure why 775 isn't sufficient for writability - perhaps 755 instead? Alternatively ask your host what you need to do, the process that runs PHP needs to write to that folder.

That is also the right path, right? (It should match whatever is specified in Settings.php for $board did with /avatars on the end)
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 28, 2023, 05:52:17 AM
thanks Arantor

changing to 755, both avatar and forum and avatar directories made no difference

I'll ask my hosting, perhaps they've set restrictions as its "shared hosting"? it could be why they give the ability to install from the cpanel?

I'll let you know what they say
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 29, 2023, 04:21:30 AM
the host couldn't see why it didn't work

I've restored the forum from the backup

any ideas on how I can upgrade?
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Kindred on March 29, 2023, 05:52:17 AM
1- restore your previous working forum
2- confirm that the forum is working
3- delete directories:  Sources and Themes
4- Delete all php files in the root forum directory EXCEPT Settings.php (keep that!!)
5- Upload the 2.1.3 archive
6- extract (with overwrite)
7- run upgrade.php
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Doug Heffernan on March 29, 2023, 05:55:45 AM
Quote from: Kindred on March 29, 2023, 05:52:17 AM3- delete directories:  Sources and Themes

I would storngly recomemend against doing that. If the OP has mods installed who have added their files inside those directories, it is going to throw errors when third party mods files are called, but not being found.
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on March 29, 2023, 06:53:53 AM
Quote from: Doug Heffernan on March 29, 2023, 05:55:45 AM
Quote from: Kindred on March 29, 2023, 05:52:17 AM3- delete directories:  Sources and Themes

I would storngly recomemend against doing that. If the OP has mods installed who have added their files inside those directories, it is going to throw errors when third party mods files are called, but not being found.

could I not just reinstall the mods? I'm guessing that some of them would need to be upgraded for the new version of the forum software anyway?
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Doug Heffernan on March 29, 2023, 07:30:24 AM
Quote from: WhiteJC on March 29, 2023, 06:53:53 AMcould I not just reinstall the mods? I'm guessing that some of them would need to be upgraded for the new version of the forum software anyway?

You can uninstall all the mods before doing the upgrade. That wouldn't cause any issues if you delete the aforementioned directories.
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Kindred on March 29, 2023, 09:15:18 AM
or use repair_settings to remove all hooks
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on April 03, 2023, 06:19:50 AM
I tried uninstalling all mods and then deleting all php files in the root forum directory EXCEPT Settings.php and Sources and Themes directories.
I uploaded the 2.1.3 package, run upgrade.php

and got the same result
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Kindred on April 03, 2023, 08:24:20 AM
Then you need to talk to your host -- because what you are seeing does not make a lot of sense
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Arantor on April 03, 2023, 08:26:18 AM
So here's the question, in Settings.php, what does it have listed for $boarddir?
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on April 03, 2023, 09:34:08 AM
Quote from: Arantor on April 03, 2023, 08:26:18 AMSo here's the question, in Settings.php, what does it have listed for $boarddir?

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = '/home/friends8/public_html/forum';        # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/home/friends8/public_html/forum/Sources';        # Path to the Sources directory.
$cachedir = '/home/friends8/public_html/forum/cache';        # Path to the cache directory.
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Arantor on April 03, 2023, 10:05:33 AM
Ah so there's the problem.

The avatar path is /home1/frienfg5/public_html/forum/avatars but from your message above, one would assume it should be /home/friends8/public_html/forum/avatars

No wonder it can't make it writable - it doesn't exist. Think that needs to be fixed first.
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on April 03, 2023, 07:21:41 PM
Quote from: Arantor on April 03, 2023, 10:05:33 AMAh so there's the problem.

The avatar path is /home1/frienfg5/public_html/forum/avatars but from your message above, one would assume it should be /home/friends8/public_html/forum/avatars

No wonder it can't make it writable - it doesn't exist. Think that needs to be fixed first.

where do I need to change the path?

$boarddir = '/home/friends8/public_html/forum'; is defined in Settings.php
so where would the update get /home1/frienfg5/public_html/forum/avatars from?

is there another file that I need to amend with the correct path details?
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: Arantor on April 03, 2023, 07:32:08 PM
No, that one is in the database in the settings table.

It's been years since I touched repair_settings.php but I thought that offered you that as an option.

The relevant setting in the settings table has the "variable" name of avatar_directory.

It's very possible this has been wrong for a while and you never noticed - this is the path to the server-hosted avatar gallery (not the one where users upload their own to).
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on April 03, 2023, 08:01:42 PM
I found that the path was set to the wrong directory in the Attachments and Avatars Avatar Settings

as its just gone 1 o'clock here I'll try the upgrade again in the morning now that the path has been corrected
Title: Re: Trying to upgrade from 2.0.19 to 2.1.3
Post by: WhiteJC on April 04, 2023, 05:25:08 AM
fixing the path sorted the problem

thanks for everyones help