Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: drusso1 on August 18, 2023, 12:32:23 PM

Title: SMF 2.1.4 does not accept new path to the attachments folder
Post by: drusso1 on August 18, 2023, 12:32:23 PM
I recently performed a large upgrade from SMF 2.0.1.2 to 2.1.4.

https://thehaikufoundation.org/forum_sm

Our old version of SMF had an outdated path for the attachments folder from our previous webhost. As a result, we are getting errors, saying that the attachments folder is not accessible.

The path on our current host, as shown in my FTP tool, is:

/thehaikufoundation.org/public_html/forum_sm/attachments

I ran the script that adds the *.dat extension to attachment files. It seems to have worked. I see the *.dat extension on the files in the "attachments" folder. The "attachments" folder has the correct permissions: 755. It has no subdirectories.

I tried to "Add Path" the new path above in Administration Center > Attachments and Avatars> Attachment Directories. The path was added, but it says the path does not exist.

I tried to Save the new path above in Administration Center > Attachments and Avatars> Attachment Directories. The path was not saved because it says the folder exists (contrary to what it said above with the Add Path option).

I ran the repair_settings.php script and accepted the recommended path, which was:

/home/customer/www/thehaikufoundation.org/public_html/forum_sm/attachments

This path had no effect on the Add Path or Save options in Administration Center > Attachments and Avatars> Attachment Directories. I got exactly the same errors as noted above.

I made a backup of the attachment files, deleted the "attachments" folder, and added a new, empty folder with the same name ("attachments"). This had no effect on the Add Path or Save options in Administration Center > Attachments and Avatars> Attachment Directories. I got exactly the same errors as noted above.

Suggestions for how to get SMF 2.1.4 to recognize our new attachments directory? Which is:

/thehaikufoundation.org/public_html/forum_sm/attachments
Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: Sir Osis of Liver on August 18, 2023, 01:07:27 PM
Think I've seen this once before.  Look in settings table, what is value for attachmentUploadDir?
Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: drusso1 on August 18, 2023, 10:03:53 PM
Thanks for your reply Sir Osis. 

SMF database
Table: smf_settings
 
 attachmentUploadDir value:
 {"1":"\/home\/gatordav\/public_html\/forum_sm\/attachments","2":"\/thehaikufoundation.org\/public_html\/forum_sm\/attachments","3":"attachments2"}
Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: Sir Osis of Liver on August 18, 2023, 10:23:25 PM
You're using three attachment directories?

Save the current value for attachmentUploadDir, replace it with this -


{"1":"\/home\/customer\/www\/thehaikufoundation.org\/public_html\/forum_sm\/attachments","2":"\/home\/customer\/www\/thehaikufoundation.org\/public_html\/forum_sm\/attachments1","3":"\/home\/customer\/www\/thehaikufoundation.org\/public_html\/forum_sm\/attachments2"}


Replace 'customer' with your account name. 

Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: drusso1 on August 19, 2023, 08:58:53 AM
What is the "account name" in this context? Since this is a value that is part of the path on our web server, I assume I assume this is our account on our webserver. But I am not familiar with  account name in this context.
Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: Kindred on August 19, 2023, 11:08:14 AM
in this case, I suggest that you check with your host
Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: Sir Osis of Liver on August 19, 2023, 04:24:14 PM
If repair_settings is displaying /home/customer/www/thehaikufoundation.org/public_html/forum_sm/attachments as recommended path, then try using the code I posted as is.
Title: Re: SMF 2.1.4 does not accept new path to the attachments folder
Post by: drusso1 on August 20, 2023, 11:08:34 AM
Thanks, Sir Osis.  Independently, I noticed that an error message for another issue included the path: /home/customer/www/thehaikufoundation.org/public_html/forum_sm.

I was able to update attachmentUploadDir as you described. This seems to have fixed a longstanding error for our attachment directory. Closing.