Before asking for help please read "How to request help" by clicking on that tab above here.
  • Page:
  • 1

TOPIC:

Media folder location for Docker 2 weeks 2 hours ago #1

  • simonszu
  • simonszu's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 5
Hi,
i have written my own Dockerfile for webtrees, beginning with 1.7 which i am currently migrating to version 2. I have created a docker volume for 1.7, mounted into /var/www/html/data for images and media. This is currently not working for version 2, showing up an HTTP 500, for the file is not found. I did not find any valuable information on which i could modify my docker configuration, so i just need a confirmation/clearance where webtrees 2 is uploading its media when installed plain, without docker, so i can resolve all my issues with volume mounting and probably access rights.

Please Log in or Create an account to join the conversation.

Media folder location for Docker 2 weeks 44 minutes ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13603
The default location for media files is /data/media

This folder is made of two parts "/data" and "/media" which you configure separately.

"/data" is part of the site settings, and allows you to store user data files anywhere on the server.
"/media" is a per-tree setting, and is always a folder inside the data folder. (i.e. you can't use ../../)
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Media folder location for Docker 1 week 3 days ago #3

  • simonszu
  • simonszu's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 5
Thanks, this helped me. To fix up clutter i reuploaded all images i had in the old data folder, to make sure that everything is uploaded like it should. Was no big deal, my family tree isn't very big yet.

However, all people's portraits appear as a dummy image, displaying an HTTP 500 error. I do not see anything related to that in the web server's logs. Do you have any idea why that could happen? They were uploaded poperly to the data folder, and are apparently accessible by the web server's system user, so i currently have no idea what could have gone wrong here.

Please Log in or Create an account to join the conversation.

Media folder location for Docker 1 week 3 days ago #4

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13603
> displaying an HTTP 500 error.

Look at the HTTP headers. You may see an error message.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Media folder location for Docker 1 week 3 days ago #5

  • simonszu
  • simonszu's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 5
Thanks. The reason was the gd library not properly installed. I'd like to bother you with a resulting problem, however. All media files are now just displayed as a red dummy image with ".jpg" in it. However, klicking on this dummy image the original image is opened in an overlay frame. What could cause this dummy image to display? The headers do not show any hints, the server logs either.

Please Log in or Create an account to join the conversation.

Media folder location for Docker 1 week 2 days ago #6

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13603
> All media files are now just displayed as a red dummy image with ".jpg" in it.

You can get this if the media file is not readable.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Media folder location for Docker 1 week 2 days ago #7

  • simonszu
  • simonszu's Avatar Topic Author
  • Offline
  • New
  • New
  • Posts: 5
As i said in the opening post, the media files are uploaded with webtrees and are readable in general since the server is able to load them when displaying in the overlay window, but not in a person's detail view.

Please Log in or Create an account to join the conversation.

Media folder location for Docker 1 week 2 days ago #8

The potential root causes for your issue are manifold. I suggest to

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Media folder location for Docker 1 week 2 days ago #9

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13603
> As i said in the opening post, the media files are uploaded with webtrees and are readable in general since the server is able to load them when displaying in the overlay window, but not in a person's detail view.

The code which generates thumbnails will produce the ".JPG in a red square" in response to (and only in response to) a NotReadableException error.

The graphics library cannot read the file.

If you see the full-size version of the files (in the popup window), then I'm guessing you are not adding watermarks.
Since we aren't resizing the file or adding watermarks, then we just copy bytes from the disk.

Maybe there is an issue with the graphics library on your server? For example, if you have a mismatch between your Imagick library and the PHP extension, then you can find that you are missing JPEG support.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum