Simple Machines Community Forum

SMF Support => Server Performance and Configuration => Topic started by: mih02k on May 12, 2009, 02:38:28 AM

Title: I have probblems with attached pics after I move on another server
Post by: mih02k on May 12, 2009, 02:38:28 AM
Hi,

I've just moved my forum to a new server, everything ok but I have one topic with pics attached and is not working, I can't see any pic attached there. In my DB is ok I think, I have them in my attachements folder in my server but I think the pics are cripted or something else . I use smf 2.0 RC1. I want to know what I must do to see the pics again in that topic.

Thank you all!
Title: Re: I have probblems with attached pics after I move on another server
Post by: JBlaze on May 12, 2009, 02:39:48 AM
Try using repair_settings.php to restore the paths to your attachments.
What is repair_settings.php? (http://docs.simplemachines.org/index.php?topic=663)
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 12, 2009, 02:46:20 AM
I use it, ...the path is ok but the pics not working
Title: Re: I have probblems with attached pics after I move on another server
Post by: JBlaze on May 12, 2009, 02:51:47 AM
Try to CHMOD you attachments directory to 755 or 777
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 12, 2009, 03:25:58 AM
Is not working  :(, I dont know what to do, I use in the firs forum this option "Encrypt stored filenames" and all pics are encrypted...is possible to make it work???
Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on May 12, 2009, 03:26:14 AM
Is it just one topic?
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 12, 2009, 03:33:17 AM
Yes is only one topic with attached pics, al post with no attachment is working good.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on May 12, 2009, 04:09:31 AM
Are there any other topics where attachments are working correctly, or is it the only topic where attachments have been posted?
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 12, 2009, 04:17:49 AM
Is the only topic with attachment and is just pics attached. Its showing the name of attached pic but when I click on it I can save the pic in my computer and when I open it is saying "Drawing Failed"!! I have no other topics with attachment.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on May 12, 2009, 04:24:59 AM
Quote from: mih02k on May 12, 2009, 03:25:58 AM
I use in the firs forum this option "Encrypt stored filenames"

Do you have this option selected now? If not, enable it.
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 12, 2009, 04:32:45 AM
Quote from: Sarge on May 12, 2009, 04:24:59 AM
Quote from: mih02k on May 12, 2009, 03:25:58 AM
I use in the firs forum this option "Encrypt stored filenames"

Do you have this option selected now? If not, enable it.


Yes I have it, I try with this setting turned ON and OFF and is not working. I have the same settings in the 2 forrums.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on May 12, 2009, 03:06:15 PM
I am having the same issue (adding my 2c so I can subscribe to any solutions)

Attached JPGs and MP3s and anything else-- the path is there, it downloads the file-- but the JPG image is corrupted or the mp3 doesnt play a proper file. Sounds exactly like what mih02k is experiencing.

Something that was suggested to me was that the FTP download/upload cant be set to Auto it has to be on Binary/ASCII but I havent had luck restoring anything.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on May 12, 2009, 06:40:49 PM
Quote from: Saleem on May 12, 2009, 03:06:15 PM
Something that was suggested to me was that the FTP download/upload cant be set to Auto it has to be on Binary/ASCII

It really depends on the FTP client, the FTP server software and/or the hosting server, but I always use Binary as default when uploading files and never had any problems. (I use FileZilla as a client, and the FTP server is usually either ProFTPd or PureFTPd.)
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on May 12, 2009, 11:26:15 PM
I am using Filezilla, and generally had it on Auto as I am a n00b and have no idea what the functional difference is.
I have old backups... but theyre downloaded in "auto" (if that's an option in d/ling as well)
Title: Re: I have probblems with attached pics after I move on another server
Post by: Something like that on May 13, 2009, 02:17:32 AM
Different operating systems use different symbols for the return/enter key. They come back from the old days when printers printed a line of text characters at a time. Unix/Linux systems us LF (line feed), Mac uses CR (carriage return), and Dos/Windows uses CRLF (both). FTP clients in ASCII mode will convert the format automatically; however, this change would corrupt binary files. In the last ten years, FTP clients are smart enough to transfer anything that doesn't seem like text as binary automatically. Furthermore, most text editors are capable of handling the other formats for the return key. So you can always use binary or auto mode and be okay.
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 13, 2009, 02:34:49 AM
I think the problem is this "Encrypt stored filenames" ...

In my new forum this option is turned off, after I have some pics umploaded again I try to test and move the forum in another server to see if the problem persist. I move it with no probblems and is working very good. So the solution is to have "Encrypt stored filenames" turned OFF. 
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on May 13, 2009, 08:43:38 AM
@mih02k are all your old attachments encrypted?

from my expereince with this problem, its a lot of old attachments; some were enc., some not.
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 13, 2009, 11:05:25 AM
Yes all my pics are enc. nothing to do. I will be more carefull in the future.

Thank you all !!
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on May 13, 2009, 02:48:42 PM
So you lost all your old attachments? No resolution??
Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on May 13, 2009, 02:53:36 PM
Only filenames are encrypted, not the content.

mih02k, can you download the attachments and see if they're displayed alright on your computer?
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 13, 2009, 08:50:34 PM
Quote from: Sarge on May 13, 2009, 02:53:36 PM
Only filenames are encrypted, not the content.

mih02k, can you download the attachments and see if they're displayed alright on your computer?

Yes I can download the attachments..

All the pics was renamed on the server when was encripted by SMF...if a user upload a picture on the forum as attachment named PICTURE.jpg on the server is named like this: PICTURE_JPG_796503cf67b2eb55cffeadabd7711243

If I download and  try to rename back in PICTURE.jpg when I open it in my computer is giving me this error: "Drawing Failed". I try with lots of programs to open it and is not working

Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on May 13, 2009, 11:27:43 PM
That probably means that the download from the old server and/or the upload to the new server didn't work correctly. Do you have a working backup?
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on May 14, 2009, 12:07:41 AM
Sarge I have the same issue. Do you think all backups failed (that is a legit question, I have no idea)? 
Title: Re: I have probblems with attached pics after I move on another server
Post by: mih02k on May 14, 2009, 11:36:42 AM
i dont have a backup...I delete my old forum now and I install coppermine for photos... I hope is better like this!

Title: Re: I have probblems with attached pics after I move on another server
Post by: JBlaze on June 05, 2009, 03:56:07 AM
Hello, just going through some old support topics. Do you still require assistance with this issue?

If so, please reply with more information about what isn't working.

Additionally, if this is already solved, please mark it solved by clicking 'Mark Topic Solved' at the lower left of your screen.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on June 05, 2009, 10:21:51 AM
Yes I still need assistance.
Encrypted attachments were downloaded under "auto" transfer type, which i guess went to ASCII
Re-uploaded attachments are corrupted, not readable, as they needed "binary" transfer

How does one fix this? THanks
Title: Re: I have probblems with attached pics after I move on another server
Post by: Sarge on June 05, 2009, 11:38:24 AM
Saleem, all decent FTP client programs should have a setting for the transfer mode/type. I know that FileZilla has a setting for this.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on June 05, 2009, 11:43:29 AM
Quote from: Sarge on June 05, 2009, 11:38:24 AM
Saleem, all decent FTP client programs should have a setting for the transfer mode/type. I know that FileZilla has a setting for this.
Yes I use FileZilla and it was set to auto.
Normally this wouldnt be an issue but I had switched and deactivated my old hosting before finding out these old attachments dont work.
I have like 30 old full file backups, but all of them are worthless because all had "auto" file transfer setting.
My old host no longer has the file images, but when they did wanted $150 to restore the files for redownloading.
Title: Re: I have probblems with attached pics after I move on another server
Post by: H on July 08, 2009, 04:13:34 PM
Is any further assistance needed with this?
Title: Re: I have probblems with attached pics after I move on another server
Post by: Leemy on July 08, 2009, 08:40:01 PM
Yes how can we recover the corrupted files?
Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on July 09, 2009, 03:36:48 AM
Recovery of corrupted files is virtually impossible to achieve, I'm afraid, unless you have an awful lot of computing time to throw at the file.

The problem concerns two binary values that may be present; 10 and 13, which are used in combinations to mean the end of line. Windows/DOS takes 13 followed by 10 to mean end of line while Linux/Unix have been using just 10 for far longer. The problem is that the interchange happens on download (because it's 'text', it autoconverts), meaning that any value of 10 in the file will have been replaced by 13, 10. But there would have been some legitimate files that do have 13, 10 in them, so for every byte changed you have to try both combinations.
Title: Re: I have problems with attached pics after I move on another server
Post by: SallyM on September 03, 2009, 09:58:09 PM

Sorry to drag this up but I'm having similar problems.

Original site is still live but I've been pre-preparing it on the new host with official move to happen shortly.

I've recreated a direct replica in every way, all good, bar attachments (and members custom avatars but that's no major).

Of 2000 attachments I've only found 3 or 4 working, all of the others are "not found" (404).

Original site is v 1.1.1 but the play site on new host has been successfully upgraded it to 1.1.10.

Its going to be tragic to lose these but I've been working on it for days, and read this thread over and over for parts I may have missed, but no luck.  "Encrypt stored files" has been enabled on the original site.  Version 1.1.10 doesn't have this option but...that should be irrelevant because the play site started as a 1.1.1 with no attachments working.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on September 03, 2009, 10:59:58 PM
Encrypt stored files is now default in 1.1.9 and up, so that shouldn't be a problem.

How did you make the copy/backup of the attachments?
Title: Re: I have probblems with attached pics after I move on another server
Post by: SallyM on September 03, 2009, 11:05:47 PM

Hi Arantor,

I just copied them from the original server to my computer then uploaded to new.

Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on September 04, 2009, 03:18:21 AM
What program did you use? If you used FileZilla to make the backup it's possible some of them may have been corrupted.
Title: Re: I have probblems with attached pics after I move on another server
Post by: SallyM on September 04, 2009, 03:22:01 AM
ftp program?

I use Smartftp - http://www.smartftp.com

If no one knows this program I'm happy to take recommendations and try with a different one.

Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on September 04, 2009, 03:26:48 AM
Well, many users here use FileZilla because it's fast and free.

With regards to SmartFTP, do you have an option to set the mode it uses for files? You want to be ensuring it uses 'binary' mode for the attachments folder.
Title: Re: I have probblems with attached pics after I move on another server
Post by: SallyM on September 04, 2009, 07:55:26 AM

It was set to "Auto". Without knowing what that meant I have just grabbed all attachments again from the original site, downloaded in binary and uploaded again in binary.

Still no luck. The same small handful working with the rest "not found".
Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on September 04, 2009, 08:02:28 AM
Very strange, that.

Given that you have a backup of both database and files, go into the forum admin area, in to Forum Maintenance and 'Find and repair any errors'.
Title: Re: I have probblems with attached pics after I move on another server
Post by: SallyM on September 04, 2009, 08:07:25 AM

Thanks Arantor, appreciating your help.

All it came up with was that a few members who didn't exist had received PM's.
Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on September 04, 2009, 08:16:33 AM
Hmm, this sounds like the attachments directory path is incorrect.

Try using repair_settings.php - What is repair_settings.php? (http://docs.simplemachines.org/index.php?topic=663)
Title: Re: I have probblems with attached pics after I move on another server
Post by: SallyM on September 04, 2009, 08:23:09 AM
I tried the repair_settings.php back at the beginning. All seemed fine.

I have quadruple checked the path but really, I figured it couldn't that given that some of the attachments are working.
Title: Re: I have probblems with attached pics after I move on another server
Post by: 青山 素子 on September 04, 2009, 11:47:54 AM
Two things I can think of:

Title: Re: I have probblems with attached pics after I move on another server
Post by: SallyM on September 04, 2009, 08:15:10 PM

Hi Motoka-Chan,

Something is a bit odd for numbers of attachments. According to Admin > Attachments and Avatars > Browse Files :

Original Site:

1488 attachments
65 Avatars
3217 thumbs
4770 total

I can physically see 1998 on the server.

Play site:

1366 attachments
63 avatars
3112 thumbs
4541 total

I can physically see 1938 on the server.


Point though. Some that I've checked which I'm getting 404 on I can see on the play site server.

I did the transfer, download and upload in binary up there a bit (comment at 7:55). All 1900 odd files deleted from play site, re-downloaded from original in binary and re-uploaded in binary.





Title: Re: I have probblems with attached pics after I move on another server
Post by: Arantor on September 20, 2009, 03:25:33 PM
I wouldn't worry so much about the thumbnails; that suggests you have some thumbnails from earlier, now deleted, attachments.

The fact you're still missing some is weird though, though I think you're still hitting the 2k file limit. It might be worth asking your former host if you can create a tar.gz of the directory contents.