MyBB Community Forums

Full Version: Uploading of attachments seems like corrupting files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is very strange,
It was working very well, but suddenly when I am trying as admin or any user to attach files I get some strange errors.
First it seems that all the image attachmets are not creating thumbnails and when I click on the thumbnail I got a non exists page and see nothing.When I am goint to ftp the file is there inside the uploads directory which is CHMODED with 777.I've tried also to attach some other type of files and it seems that only the text file is working properly.Word (.doc) files has a strange behaviour, they are uploading right and the link downloads them, but when I am trying to open them with Word, word behaves them as text files and is loading some rubish characters.With .pdf files it seems that when Adobe reader opens them after they got uploaded, the files are getting corrupted.I don't have a clue why this is happened even in the latest version.It's very serious matter and crucial for the forum operation, so we must find a solution.I've read all the other topics regarding the same matter with mine and I've checked all the solutions but still nothing.I remind you that before some time, attachments were working fine.So I think it is a bug, cause I haven't installed a plugin either since.

Any workaround for that? I am using 1.4.11 version

Thank you in advance
Can you post any error codes and give us a link to an example.
Thank you for your answer, the thing is that there are no error codes, just corrupted files.
I cannot see image attachments with all browser (IE,Firefox,Chrome,Opera).
If you want I can make you a test account, we must solve this problem ASAP.

Thank you in advance for your nice support.
It's a common issue. Your PHP files are corrupted with UTF-8 Byte Order Marks. Most likely because you edited them with Windows notepad. Open the files you modified with a proper editor like Notepad++ and make sure to save it as UTF-8 without Byte Order Mark.
I have edited a lot of files but not crucial ones, just languages, can a language file edited with other editor than Notepad, (I used Ultraedit) be responsible for this?
Any PHP file that's included during a request can be responsible for this.

Use dirwalk to get a list of candidates:
http://community.mybboard.net/thread-473...#pid347635
Thank you for your help, I have corrected all the errors with dirwalk, but still corrupting attachments Sad Any other idea for this?
You'll have to provide a thread that has one such attachment in order for me to see what's wrong with it.
I made a clean of cache and now all seems to be allright, thank you for the excellent support.MyBB is the best forum system ever Smile
Another thing I,ve noticed with dirwalk is that there are some files that I didn't touched that have FAILED, how can this happen? Can I trust dirwalk in this?