Skip to content
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

Server gets stuck on 500 Internal Server Error if unsupported image attached to part #89

Closed
stenstad opened this issue Jan 5, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@stenstad
Copy link

stenstad commented Jan 5, 2021

If you upload any image not supported by gd.so, the server will throw an execption in /var/www/html/vendor/imagine/imagine/src/Gd/Imagine.php at line 95, since createImageFromString($data) above it only creates a valid resource if GD supports the image format.

The GD bundled with the docker image (jbtronics/part-db1:latest) does not support a lot of formats. PNG works, JPEG or WEBP does not.

It should probably fail more gracefully, as you need to delete the file on disk to get PartDB running again.

To Reproduce
Steps to reproduce the behavior:

  1. Add an attachment to any part.
  2. Upload a jpeg.
  3. Wonder why PHP is not able to access the file on disk.
@Chris-42
Copy link

seema again to be a problem

jbtronics added a commit that referenced this issue Jul 20, 2022
We now just fall back to the original image instead of throwing an exception. (partly) Fixes issue #89. Maybe related to issue #136
@jbtronics
Copy link
Member

Part-DB should dont throw an exception which makes it impossible to continue now. Instead, the original file is served, if no thumbnail can be generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants