News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Attachment Not Found

Started by aswuser, June 03, 2021, 04:23:51 PM

Previous topic - Next topic

aswuser

SMF v1.1.21  php 5.6

We moved the forum to a new host; finally got it all working except for this issue. When making a new post and adding an attachment (jpg) the process seems to go as it should but when review the post, the image does not display. Trying to view image gets error 404 - Attachment Not Found.

Attachments on older posts show up fine. I know the path to attachments directory is correct.  You can see what it looks like here:
https://schoolofevolutionaryastrology.com/forum/index.php/topic,1720.0.html

Screen shot is attached. 

Also it appears the attachment is not getting processed. It looks like when you upload an attachment, SMF renames the file to something like "162000_ca280451ea5b" but  the one I uploaded is named "post_tmp_4_0".

Any ideas on what is going on and how to repair?


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."

aswuser

I already tried updgrading to from 1.1.21 to 2.0.10 - over a year ago. That failed. But thanks for the suggestion. I do plan to try upgrading again but need to keep this version running until that time.

Attachments was working fine before the move.

Grammy

Whenever I've moved a forum from one host to another, I always upload repair_settings.php to my forum's root and check the URLs.  There's a link for it in my signature.   :)

shawnb61

Since it appears you have the temp file, the upload itself worked.  What failed is the last step, after a number of edits, it renames the temp file to the real filename.

If the rename itself is failing (which moves it from the temp dir to the attachment dir), that suggests to me there is likely an issue with attachment folder permissions. 

Double-check the folder name in repair_settings.php,  and also double-check the folder's permissions.   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sir Osis of Liver

If php version on new host is higher than 5.5 (it should be) things will go badly with SMF 1.1.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

aswuser

Path to attachments directory is correct.
I changed permissions on attachments directory to 77. It made no difference.

I did upload repair_settings.php and tried to run it but it does not parse correctly. Only part of the page loads (and not the submit button) so it is unusable. I did have to update all the paths - SMF Directory, Sources Directory, theme's directory, etc. They are all correct.

We are using PHP 5.6. The reason for the move is old host no longer supports anything below php 7. I will see if new host supports lower version. Do you recommend PHP no higher than 5.3?

Sir Osis of Liver

1.1.21 should run in php 5.6, but will log a lot of errors.  You need to upgrade to current version.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Dzonny

You should REALLY consider upgrading to 2.0.18. You'll hardly find any good host which supports such old PHP versions. Plus they'll all drop support soon if you find any.
If you need a hand with upgrading you can always open a new topic regards that, and we'll gladly help :)

Advertisement: