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
Think I've seen this once before. Look in settings table, what is value for attachmentUploadDir?
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"}
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.
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.
in this case, I suggest that you check with your host
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.
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.