Moved 2.0.1 to new server attachments missing

Started by techdesigner, February 11, 2016, 05:03:03 AM

Previous topic - Next topic

techdesigner

I moved my SMF to a new server and received an error when trying to upload attachments or change avatars. In the admin (attachment and avatars) section I changed the paths for everything to the new server. I now no longer receive the error and the paths are correct so I can now upload attachments. Now when I look at past attachments they are broken image icons and if I click the paperclip it says the image is damaged.

The attachment directory is still full of images.

I found Attachment Integrity check: Run check now but did not want to try that without checking here if this is a good idea. I didn't want it to remove the images from the directory because of a bad path or something like that.

Would "Run check now" fix this problem or is there something else I can do?
Thanks

Illori


techdesigner

I looked and I have 2.0.11 which which is the current version as far as I can tell.

I used ftp to transfer all files.

I made a backup and restored the database on the new server.

At first I had the incorrect path for avatars and attachments in the admin section and was receiving an error. I corrected that and now I have broken images above attachment paper clips.

I did not know if I should do Attachment Integrity check: Run check now or repair_settings.php or both?
Is there a chance that either will remove the actual images from the attachments directory?

Thanks

Illori

the subject of this topic says you are running 2.0.1. so that may have confused us.

the integrity check i believe may remove attachments/avatars. repair_settings.php will never remove anything.

techdesigner

I tried running repair_settings.php and some of the settings were  still set to the old server. I changed the settings to the recommended setting. I still have a broken pic icon above attachment icon and when I click on the link it opens a page on my site /forum/index.php?action=dlattach;topic=950.0;attach=3514 with a 404 -Attachment Not Found

Illori

can you provide a link to your forum?

is your attachments folder present on the new server?

Kindred

that suggests that the file may not actually be present...


How did you transfer all the files?
Did you use ftp?  more importantly, did you use filezilla?
Сл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."

techdesigner

I paid my hosting company to transfer the forum over and I recreated a new website with the forum.  I don't know what ftp software they used. The old site and forum were still up with the domain name while I worked on the new site. I don't know if the attachments were working after they transferred but nobody complained.

I then moved the site and forum into the final directory on the same box, pointed the domain name to this box and made the directory changes.

The attachments folder is there and full. I don't know if the attachments are damaged or the links in the pages are bad. I am not sure how to figure this out or what else to try.


Kindred

attachments are renamed with a hash and the extension is removed (for security purposes)
the system stores and re-applies the file type when the attachment is viewed

If your host was not careful, it is possible that they screwed up the file contents in the transfer, because of the lack of an extension.
Сл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."

techdesigner

Thanks Kindred,

That is what I was finding from searching the web. Most of the articles were from early, 2009-12 and they said this was causing a lot of problems that they hoped SMF would fix.

Is there a way to fix this? If I compress the attachment directory from the old host, download to my computer, upload to new host, and uncompress (not sure how) and replace attachment folder will this work? Will the forum on the new site recognize the files?

I have >3000 attachments, Is there anything else you would suggest?

Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

techdesigner

Solved the problem, Lunarpages hosting must have used FileZilla or another FTP program to transfer the files uncompressed from the old server to their server. This corrupted the attachments/avatars as several people here suggested. I compressed the two folders on the old server and downloaded from cPanel file manager. I uploaded the same way to the new server, uncompressed and replaced the two directories. It works!  ;D

My only regret is not coming here a week ago and asking advice from the crowd (and paying the host to move something that I should have just learned how to do from the beginning), Thanks!

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

Advertisement: