Search…

X3 Photo Gallery Support Forums

Search…
 
zeroday
Topic Author
Posts: 16
Joined: 09 Mar 2008, 16:16

The image could not be loaded

08 Sep 2021, 04:54

Ubuntu latest version 21.04
Apache2
PHP 7.4

Image

Thumbs are ok loaded, folder structure as well
content is folder is a mounted CIFS share from NAS 

Log does not show issues for apache
/content/Diversen/3FM/DSC00988.jpg HTTP/1.1" 200 
it gives an 200 

99% of all images do fail only a very very few are loaded and displayed, sometimes a image is loaded but direclty the messge The Image could not be loaded

thumbs are loaded ok
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: The image could not be loaded

08 Sep 2021, 05:33

Do you have a link? That message basically just displays that the image cannot be loaded directly by URL. For example, if you are using NAS/mount/symlink, maybe the image is forbidden or not available public on www. X3 can still create resized images from images that are not available by direct link. I need a link if I am to diagnose. You can check browser network inspector, and see what the error message is ... Likely "forbidden" or "File not found".
 
zeroday
Topic Author
Posts: 16
Joined: 09 Mar 2008, 16:16

Re: The image could not be loaded

08 Sep 2021, 05:43

actually I found the issue rather quick (Browser does not give info as all is ok)
Issue could also be found creating simple html file with <img src=  in it to the image and it was not loaded from apache)

so the issue was not related to X3 but an issue within Apache reading files from the samba share
I noticed that apache was tampering with the file as it added content to it.

so searching on the big internet .. : it looks like an apache 2.4 bug 
as found here:
https://www.apachelounge.com/viewtopic.php?t=8504

So solution is (for me) but probably for others:
in my apache2.conf 

I have added

EnableSendfile On

so:
<Directory /var/www/html/>

        EnableSendfile On

        Options Indexes FollowSymLinks

        AllowOverride All

        Require all granted
</Directory>

restarted apache and issue fixed.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: The image could not be loaded

08 Sep 2021, 06:11

Alright, thanks for sharing the solution!  :clap: