Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
BeBop
Registered User
Posts: 43
Joined: Tue Sep 05, 2017 1:07 pm

Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by BeBop » Thu Jul 11, 2019 10:29 pm

Dear support and KevC,

Two old giffers back here again. We followed your advice KevC, rather than getting our hosting provider to roll back a PHP 7.2 update or two we upgraded phpBB board from version 3.2.2 to 3.2.7 yesterday.

http://www.973-eht-namuh-973.com/forum/ ... mode=login

While everything seemed to be working, one problem we have uncovered is that we appear to have lost every inline attachment image posted since the last upgrade from version 3.2.1 to 3.2.2 completed last year during the first week of September 2018.

We still have a copy of the system before the upgrade, is there a file that contains those attached images in the pre-uugrade copy mentioned that we failed to include and use in the upgrade to 3.2.7. If so can which get it back and install it in 3.2.7 or would that require doing the whole upgrade again.

Please advise

Thank you in advance and
kind regards
BeBop
Last edited by BeBop on Fri Jul 12, 2019 8:52 am, edited 1 time in total.

User avatar
janus_zonstraal
Registered User
Posts: 3257
Joined: Sat Aug 30, 2014 1:30 pm

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by janus_zonstraal » Fri Jul 12, 2019 5:12 am

What update method did you use?

Normally you can't loose the files but the are in the files folder.
Sorry! My English is bat ;) !!!

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50482
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by stevemaury » Fri Jul 12, 2019 2:32 pm

Make sure the /files folder is CHMOD 777. I get a permission error when I try to browse to it.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

BeBop
Registered User
Posts: 43
Joined: Tue Sep 05, 2017 1:07 pm

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by BeBop » Fri Jul 12, 2019 4:57 pm

Thanks Janus and Steve.

We will check

Regards BeBop

robbell
Registered User
Posts: 10
Joined: Sun Feb 27, 2011 12:33 am

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by robbell » Sat Jul 13, 2019 1:05 am

Hi,

I'm the guy who updated the forum. I did it using the Automatic Update package and manual file uploads. I did the uploading from Dreamweaver CS3

The files folder is definitely 0777, I just had a look.

Any help you can give us will be greatly appreciated, as I'm completely stumped as to why the images have disappeared

User avatar
EA117
Registered User
Posts: 629
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by EA117 » Sat Jul 13, 2019 1:38 am

stevemaury wrote:
Fri Jul 12, 2019 2:32 pm
Make sure the /files folder is CHMOD 777. I get a permission error when I try to browse to it.
Same is true on https://www.phpbb.com/community/files too, for what it's worth.
robbell wrote:
Sat Jul 13, 2019 1:05 am
Any help you can give us will be greatly appreciated, as I'm completely stumped as to why the images have disappeared
Since we don't know what's going on yet, can you expound on what "disappeared" actually means.

e.g. Is there just literally "nothing", or maybe a broken image artifact displayed, or maybe [img][/img] BBCodes being displayed instead of interpreted, etc.

If there is a publicly-accessible post that demonstrates this, maybe you can link to that. Or at least show a screen shot of what the failure looks like, if it can't be a public link.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66320
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by Lumpy Burgertushie » Sat Jul 13, 2019 4:52 am

robbell wrote:
Sat Jul 13, 2019 1:05 am
Hi,

I'm the guy who updated the forum. I did it using the Automatic Update package and manual file uploads. I did the uploading from Dreamweaver CS3
either one or both of those things could be the cause of your problems.

unless you have been editing the core code of the php files there is no reason to use the auto update. it has its problems.

you should use the standard file replacement method mentioned in the instructions for updating/upgrading.

also, dreamweaver is not a good program to use for anything to do with phpbb. it is known to cause problems with phpbb.

use a good normal ftp program like filezilla to upload/download files keeping in mind that you MUST set it to transfer files with no extension in binary and not ascii. set it to binary for everything. it will not hurt any files like ascii will if they are images or pdfs etc.

use only a good text editor like notepad++ or editpad lite to open/edit the phpbb files.


for now, you need to check the actual images in the files folder to see if they are corrupted. add a jpg extension to a few of them and see if they open as images ok. then you can remove the jpg extension after you test.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50482
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by stevemaury » Sat Jul 13, 2019 3:33 pm

The files in the /files folder are not necessarily .jpg files. I you look in the database attachments table, you can correlate real filenames to physical filenames to determine which, if any, are .jpg files and test there viability by adding that extension and browsing to them.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

BeBop
Registered User
Posts: 43
Joined: Tue Sep 05, 2017 1:07 pm

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by BeBop » Sat Jul 13, 2019 6:15 pm

EA117 wrote:
Sat Jul 13, 2019 1:38 am
stevemaury wrote:
Fri Jul 12, 2019 2:32 pm
Make sure the /files folder is CHMOD 777. I get a permission error when I try to browse to it.
Same is true on https://www.phpbb.com/community/files too, for what it's worth.
robbell wrote:
Sat Jul 13, 2019 1:05 am
Any help you can give us will be greatly appreciated, as I'm completely stumped as to why the images have disappeared
Since we don't know what's going on yet, can you expound on what "disappeared" actually means.

e.g. Is there just literally "nothing", or maybe a broken image artifact displayed, or maybe [img][/img] BBCodes being displayed instead of interpreted, etc.

If there is a publicly-accessible post that demonstrates this, maybe you can link to that. Or at least show a screen shot of what the failure looks like, if it can't be a public link.
Good evening EA117 further to your question please find below publically accessible post links to demonstrate the problem:

http://www.973-eht-namuh-973.com/forum/ ... =1&t=14820
http://www.973-eht-namuh-973.com/forum/ ... =1&t=14849

Small oblong window displayed in the post which contains the picture icon and the words “image.jpeg” or “image.png” which if you click on it goes instantly to a system message display “The selected attachment does not exist anymore.”

Regards BeBop

User avatar
EA117
Registered User
Posts: 629
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by EA117 » Sat Jul 13, 2019 7:25 pm

"In general" the behavior does seem consistent with "there are attachments in the database which aren't being found in the actual /files directory." What is actually seen when loading one of the problem pages is that trying to pull a thumbnail for one of the images will actually return status 500 (web server unable to complete request), while the others return a more normal 404 (not found) status. But it's not consistent which one will return 500 versus 404.

For example in the http://www.973-eht-namuh-973.com/forum/ ... =1&t=14820 thread, I can get 500 for file.php?id=4095 and 404 for file.php?id=4096 and all the others; but on a reload of the page, file.php?id=4096 may return 500 and file.php?id=4095 and all the others are the ones that return 404.

So maybe there is a clue in the web server and/or PHP error logs, which is being recorded during the 500 status event. I'm thinking of things like maybe there will be an error or call stack that implicates one of the additional extensions that are in use, or similar.

Aside from that, I agree with what Steve suggested too, regarding tracking down one of the "file ID to real file name in /files directory" mappings out of the database, and determining whether that file exists, whether that file has some kind of unique permission applied to it, whether it's content seems corrupt or maybe zero-length now, etc.
stevemaury wrote: The files in the /files folder are not necessarily .jpg files. I you look in the database attachments table, you can correlate real filenames to physical filenames to determine which, if any, are .jpg files and test there viability by adding that extension and browsing to them.
For example, in this screen shot here, I'm looking at attachment ID 1 out of the phpbb_attachments table, and can see that this attachment ID has a filename of "2_47ca94c7e0d7f7dd631a1a1b0b45c296", and the original filename was "sometext.png". So I would go verify the existence and security on /files/2_47ca94c7e0d7f7dd631a1a1b0b45c296, and then make a copy of that file and rename it to "sometext.png" and try to view the file to make sure it's not corrupt or empty.

attachment.png

In your case, you would have @robbell do that for at least attachment IDs 4095 and 4096 since we saw those as being affected, as well as any other affected attachment IDs you wanted to check.

What happens next probably depends on whether you find that the files are simply missing, or are all wrongly secured and preventing access, or are all corrupted, or all seem to be 100% fine, etc.

User avatar
canonknipser
Registered User
Posts: 1995
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Done 3.2.2 to 3.2.7 upgrade but inline attachments missing

Post by canonknipser » Sun Jul 14, 2019 10:46 am

For validating the attachment files, you can use this script to generate a copy having the original file names:
Knowledge Base - Backing up attachments with their original filenames
Even if the script was created for phpBB 3.0, it should still work with 3.2.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

Post Reply

Return to “[3.2.x] Support Forum”