: I am native German speaker, this post is translated by Google
For days now I've been looking for a solution to the problem that images that are embedded as file attachments in a post are no longer displayed in the post itself when I switch the server to PHP version(s) 8.0 / 8.1. About 4 weeks ago I did this on my site, but I didn't notice at first (on due to vacation/summer doldrums) that in all posts in which pictures were included as attachments, these pictures are no longer displayed, only the Filename of the image with a link, but it leads to an error message...
This is how it looks correctly with version 7.4: [ external image
This is how it looks with version 8.0/8.1: [ external image broken
The attachments are correctly filed in the correct folder and entered correctly in the database. I checked that. It was only after days of searching here and on phpbb.com this afternoon that I came up with the idea of changing the PHP version, and voila, in fact, immediately after clearing the cache the images attached to posts were displayed correctly again.
I had disabled all extensions when I noticed this behavior and turned all extensions back on bit by bit. That took a lot of time because the cache had to be emptied every time. I still had phpbb version 3.3.7 installed. After I was sure that it wasn't wrong settings or extensions, I updated to version 3.3.8, which also had no effect. The attachments are saved by default in the /files folder and I checked that for permissions as well (770) [ see here
] and I also randomly checked the files by downloading them and renaming them (e.g. adding the extension .jpg) [ look here
]. All files were readable and therefore valid. As a test, I posted various posts with attachments. Interestingly, the PDF attachments were correctly embedded, which means the link to the PDF file was valid and the file could be downloaded. If I activate the PDF Embedded extension, the PDF is also correctly embedded in the post. Images, on the other hand, were not displayed and the link to the images did not work either.
I actually came across PHP version 8 by accident because I noticed in the support forum on phpbb.com that there were often problems with PHP 8 when updating to version 3.3.7 or 3.3.8. I wasn't even sure if I had also switched to version 8 and when I found out and switched to 7.4 and emptied the cache, the pictures were there again.
I hope that there is a solution for this behavior here, because my hoster has already announced that PHP 7.4 will be switched off in November 2022.
Incidentally, I don't know the reason for the Lightbox extension, because even if this extension is deactivated, the attachments are not displayed in PHP 8. Also other extensions of phpBB 3.3.x do not run correctly with PHP 8, e.g. /paybas/breadcrump or /tas2580/seourls (yeah okay hasn't been maintained for years)