-
-
Notifications
You must be signed in to change notification settings - Fork 135
SOLVED: JPEG/JPG-Attachments führen zu RuntimeExceptions - Dockerfile angepasst auf PHP7.4 Syntax #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
bug
Something isn't working
Comments
----------------- Das angepasste Dockerfile ---------------------
|
Since I managed to understand the cause of the issue and found a workaround for my environment, this issue #112 may be closed, since it is more or less just the documentation of my investigation into the underlying issue. Microplayer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Im Rahmen weiterer Tests nach der manuellen Neuanlage der SQLite-DB fiel mir auf:
PDF-Dateien können mit dem aktuellen Docker-File für Part-DB 1.0.0-alpha vom Commit "7bdf453" im März 2021 problemlos als Attachments zu Parts hinzugefügt werden. Sie werden gespeichert, man kann sie downloaden und auch als Download aus Part-DB heraus direkt ansehen.
Gleiches gilt für PNG-Dateien, um Fotos von Bauteilen in Part-DB abzulegen.
Eine RuntimeException kommt dagegen sofort, wenn man versucht, ein JPG-Foto als Attachment zum Bauteil hinzuzufügen. Glücklicherweise konnte ich es unmittelbar mit dem "Delete"-Button rechts wieder löschen, ohne die Datenbank zu korrumpieren.
Bei der weiteren Kontrolle in der CLI des Containers fiel dann aber auf, das die bemängelte Datei tatsächlich unter dem richtigen Namen in pubic_media existierte!!! Siehe beide angehängte Hardcopies.
Das brachte mich zu dem Schluß, dass Part-DB wohl ein Problem mit der Verarbeitung von JPG-Files hat. Einige wenige Google-Klicks später: https://github.com/docker-library/php/issues/912
Und https://github.com/php/php-src/blob/PHP-7.4/UPGRADING#L755-L764
Der Nachweis fällt leicht - irgendwo in den verlinkten Dokumenten ist ein Verweis auf den folgenden Befehl:
php -r 'print_r(gd_info());'
Die Ausgabe im aktuellen Container der 1.0.0-alpha lautet:
Array
(
[GD Version] => bundled (2.1.0 compatible)
[FreeType Support] =>
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPEG Support] =>
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[WebP Support] =>
[BMP Support] => 1
[TGA Read Support] => 1
[JIS-mapped Japanese Font Support] =>
)
@jan: Im Dockerfile wäre wohl folgende Änderung seit PHP 7.4 "irgendwie" zu berücksichtigen:
docker-php-ext-configure gd --with-freetype --with-jpeg
Dann sollte die Verarbeitung von JPG-Dateien wieder funktionieren.
Ich habe versucht, manuell diese JPG-Unterstützung nachträglich in meinen Container hinein zu
installieren. Leider bislang erfolglos.
@jan: Bitte überprüfe meine Informationen und lade ggf. einen angepassten Container auf den Docker-Hub. Vielen Dank vorab!
Grüße, Microplayer
The text was updated successfully, but these errors were encountered: