Bienvenue, Invité
Nom d'utilisateur : Mot de passe :
Before asking for help please read "Requesting Help and Suggestions" by clicking on that tab above here.
  • Page :
  • 1

SUJET :

404 errors for all media after 2.1.0-beta.2 upgrade il y a 2 mois 1 semaine #1

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21
Greetings. I recently upgraded a FreeBSD system running webtrees 2.0.23 and php73 to webtrees-2.1.0-beta.2.zip and php80. This system uses nginx as a webserver.

The system serves pages OK with one big exception: No media object will display. In its place there is a red 404 box.

The odd thing is there is no 404 entry in the nginx error log. Further, the webtrees/data/media directory is in the correct place with the same permissions as in the previous version.

I could use some troubleshooting help in understanding what broke here. Thanks in advance.

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 2 mois 1 semaine #2

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21
ps. In the media tab for each individual, the thumbnails appear as red 404 squares.

Clicking the name of a media object brings up a page for that object, and that page does display a thumbnail.

However, clicking the thumbnail brings up a pop-up page with a "This image failed to load" display, again without nginx logging an error. Because the nginx error log does have other entries, I do not think nginx logging is an issue.

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par nycvelo. Raison: omitted log entries; deleted log entries, which were not from me but rather some random client on the Internet. Basic problem remains: 404 display without logging from requests for media objects

404 errors for all media after 2.1.0-beta.2 upgrade il y a 2 mois 1 semaine #3

  • Czarnecki
  • Portrait de Czarnecki
  • Absent
  • Nouveau membre
  • Nouveau membre
  • Messages : 30
I have the same problem. After the update to version 2.1. I have received messages with about 15 fatal warnings. The system is stuck saying the website is unavailable
.

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 1 mois 1 semaine #4

Same problem here.
Except that I just installed the newest version (2.1.2).
Then I copied all my pics from an 2011-phpgedview-installation into the data/media/ - folder.
I already tried brutal right-changes (like recursive chmod 777 on /media/), nothing ...

Strange to see that the pics are recognized by name but only get displayed as red - 404 - box.
Maybe automatic thumbnails don't work?

Or is it the wrong path? It is shown in the installation-explanations of my installation as "/usr/www/users/mysqldb/webtrees/app/../data/" ... but I did NOT put it there, I put all the pics into /data/media/ for I HAVE no "media"-Folder in "app" but one in "data", I have to admit. Never saw sth like that.)
(And also I cannot understand the "/../" in the adress copied in above.
If u love freedom, dignity and sovereignty
use deepl.com, openstreemap.org e.g.

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par haraldino.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 1 mois 3 jours #5

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21
Any update on this? I'm still unable to determine the source of the 404 errors for images since upgrading to WT 2.1.x and PHP 8.0.

Thanks in advance for further troubleshooting clues.

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 1 mois 3 jours #6

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrateur
  • Administrateur
  • Messages : 16089
> Or is it the wrong path? It is shown in the installation-explanations of my installation as "/usr/www/users/mysqldb/webtrees/app/../data/" ...

Is what the wrong path.

What is the media folder for the tree? You can see this in the control panel, family tree, preferences.

The ".." means go up one folder.
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 1 jour #7

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21
Hi, I'm the original poster. I think my issue is different: Even after upgrading to 2.1.4 and checking permissions, I'm still seeing 404 errors for media. The nginx logs only show successful retrievals, no errors, and the media path is set correctly in the Control Panel.

Thanks in advance for further troubleshooting clues on finding the source of these 404 errors.

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 1 jour #8

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrateur
  • Administrateur
  • Messages : 16089
OK - give us a specific example to work with.

What is your data folder? (Control panel -> Website preferences)
What is your media folder? (Control panel -> Family tree -> Media folder)
What is the folder/filename of the media object? (From the media object's page)

Where have you stored this file on disk?
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

Avez-vous besoin d'une solution d'hébergement web pour votre site webtrees ?
Si vous préférez un hébergeur spécialisé de webtrees, la page suivante en liste quelques-uns capables de vous offrir ce type de service :

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 1 jour #9

Sorry, didn't see fisharebests reaction before I posted the following!
Please disregard my post down here, work on nycvelos problem first!


Hello nycvelo! Sorry for possibly derailing ur thread.
But I still do think we have the same trouble.
I upgraded to 2.1.4 too now from a completely new a 2.1.2-installation and I have the same effects: Only 404-boxes.
But give me an info, if you want me to open another thread, no problem.

>
What is the media folder for the tree? You can see this in the control panel, family tree, preferences.

With the new installation little is better and the path is the standard path "/usr/www/users/wuitad/webtrees/app/../data/" and that is where I copied the pic-files into a subfolder "media". Little? Yes, for some persons I do no more get a 404-box but the standard pic, a grey silhouette of a standard but gender orientated head from the side.
So: I see the pics in the correct folder but 2.1.4 does not use them.
Even adding one by one doesn't change anything: "The file does not exist."
Maybe there is trouble with the thumbnails fabrication?
I add now a completely new file to a person where the file is NOT already uploaded into the data/media/-Folder.
Result: Works !
If u love freedom, dignity and sovereignty
use deepl.com, openstreemap.org e.g.

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par haraldino.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 17 heures #10

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21

OK - give us a specific example to work with.

What is your data folder? (Control panel -> Website preferences)

data/

What is your media folder? (Control panel -> Family tree -> Media folder)

data/media/

What is the folder/filename of the media object? (From the media object's page)

The media object's page does not specify a folder or filename. There is a caption identifying people in the picture but no path or filename.

Where have you stored this file on disk?

All media objects live in /usr/local/www/webtrees/data/media

This is my page in Webtrees. The URL for the thumbnail image of my profile picture is:

arbor.potrzebie.org/index.php?route=%2Ft...sition=inline&mark=0

The data folder has 0777 permissions and is owned by root:wheel

The media folder has 0750 permissions and is owned by root:wheel

This particular filename is "LohoTadjudinNewman.jpg". It has 0644 permissions and is owned by root:wheel.

This the same directory structure and permissions that previously worked with previous versions of webtrees. The nginx logs do not show errors for the 404 red squares that appear instead of the media objects. Some objects on some pages do display thumbnails but then show 404 errors when clicking on those objects. Other objects do display as expected.

Again, thanks in advance for more troubleshooting clues.

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par nycvelo.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 13 heures #11

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrateur
  • Administrateur
  • Messages : 16089
> The media object's page does not specify a folder or filename.

Filenames are only shown when you are logged in. Here is an example from the demo site. You can see the filename "Althorp_House.jpg"



The filename might include a folder as well. This folder name is important.
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 13 heures #12

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21

> The media object's page does not specify a folder or filename.

Filenames are only shown when you are logged in. Here is an example from the demo site. You can see the filename "Althorp_House.jpg"



The filename might include a folder as well. This folder name is important.

Clicking on the media object displays the 404 error, as shown in the first screenshot. Clicking on the caption shows the filename and a thumbnail image, as displayed in the second screenshot.

The photo is world-readable and is in the data/media folder that webtrees can see.
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 4 semaines 2 heures #13

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrateur
  • Administrateur
  • Messages : 16089
Media folder: data/media
Filename: LohoTadjudinNewman.jpg

So, webtrees should look for the file data/media/LohoTadjudinNewman.jpg

> The data folder has 0777 permissions and is owned by root:wheel
> The media folder has 0750 permissions and is owned by root:wheel
> This particular filename is "LohoTadjudinNewman.jpg". It has 0644 permissions and is owned by root:wheel.

I'm assuming that your webserver isn't

* running as root
* running as a user in the group "wheel"

(Both of these would be a poor choice from a security perspective).

So, I guess that it cannot view the contents of data/media - hence you get a "file not found" / 404 error.

Either change the permissions so that your webserver can read the folder, or change the owner of the folder to match the webserver.
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 3 semaines 17 heures #14

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21

Media folder: data/media
Filename: LohoTadjudinNewman.jpg

So, webtrees should look for the file data/media/LohoTadjudinNewman.jpg

> The data folder has 0777 permissions and is owned by root:wheel
> The media folder has 0750 permissions and is owned by root:wheel
> This particular filename is "LohoTadjudinNewman.jpg". It has 0644 permissions and is owned by root:wheel.

I'm assuming that your webserver isn't

* running as root
* running as a user in the group "wheel"

(Both of these would be a poor choice from a security perspective).

So, I guess that it cannot view the contents of data/media - hence you get a "file not found" / 404 error.

Either change the permissions so that your webserver can read the folder, or change the owner of the folder to match the webserver.

In FreeBSD, the root user starts the Nginx process as root and then spawns subprocesses that run as user www.

But...this isn't a permissions problem. If it were, Nginx's error log would note that, and there are no entries to indicate a permissions issue.

Further, even after changing ownership of data/media and all files under it to www:www and then restarting Nginx, the 404 icons persist, again without Nginx's error logs showing a complaint. (Error logging is working; attempts to access a nonexistent page will generate a log entry.)

Even when owned by root:wheel, the media directory and all contents within are world-readable, and the media directory is world-executable.

This doesn't appear to be an issue of Nginx and permissions. This behavior began after an upgrade from webtrees 2.0.x and php7.3 to webtrees 2.1.x and php 8.0. Thanks in advance for future troubleshooting clues.

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 3 semaines 1 heure #15

  • fisharebest
  • Portrait de fisharebest
  • Hors Ligne
  • Administrateur
  • Administrateur
  • Messages : 16089
> The media folder has 0750 permissions and is owned by root:wheel

> In FreeBSD, the root user starts the Nginx process as root and then spawns subprocesses that run as user www.

So user www cannot read the media folder, and this would cause a 404 error...
Greg Roach - Cette adresse e-mail est protégée contre les robots spammeurs. Vous devez activer le JavaScript pour la visualiser. - fisharebest.webtrees.net

Connexion ou Créer un compte pour participer à la conversation.

404 errors for all media after 2.1.0-beta.2 upgrade il y a 2 semaines 6 jours #16

  • nycvelo
  • Portrait de nycvelo Auteur du sujet
  • Hors Ligne
  • Nouveau membre
  • Nouveau membre
  • Messages : 21

> The media folder has 0750 permissions and is owned by root:wheel

> In FreeBSD, the root user starts the Nginx process as root and then spawns subprocesses that run as user www.
So user www cannot read the media folder, and this would cause a 404 error...

It's not a permissions issue. The directory and files are world-readable. And the issue persisted even after chown'ing the entire webtrees tree to be owned by www:www and rebooting.

What DID resolve this was clearing the browser cache (in my case, Brave, a Chrome derivative). A clue came from noticing that (a) Nginx never logged 404 errors and (b) Firefox and Safari browsers correctly displayed all images.

The root cause was the Brave browser's bad cache contents, completely unrelated to the server.

OK, upgrading to 2.1.5 now...

Connexion ou Créer un compte pour participer à la conversation.

Dernière édition: par nycvelo.
  • Page :
  • 1
Propulsé par Kunena