thibaud-rohmer / PhotoShow

A free web gallery in PHP with drag-n-drop support
http://www.photoshow-gallery.com
502 stars 151 forks source link

Thumbs are not created #311

Open seehma opened 7 years ago

seehma commented 7 years ago

Hi there,

First, thanks for this great tool. Nearly all works well, but i dont get any thumbs. i can upload the files via FTP to the folder or with the online mask. But no thumbs are generated. When i login with the first user the files for the settings and the folders Conf and Thumbs are generated but when i upload a pic nothing else is generated.

Is there anything i can look? Maybe a wrong config (but i donth think so because there is nearly nothing to configure), maybe some rights?

i tried the magic quotes on and off, but nothing helped.

Best regards

Matthias

miklos-szel commented 7 years ago

no matter where you store the generated thumbnails the temporarily files are generated in the root of the photoshow. make sure the web server has write permission there example:

-rw-r--r--   1 root     root        1402 Jul 13 09:32 config.php
drwxr-xr-x   2 root     root        4096 Jun  6 11:00 docker/
drwxr-xr-x   4 www-data www-data    4096 Jul 13 09:58 generated/
-rw-r--r--   1 root     root          14 Jun  6 11:00 .gitignore
drwxr-xr-x   6 root     root        4096 Jun  6 11:00 inc/
-rw-r--r--   1 root     root        2181 Jun  6 11:00 index.php
drwxrwsr-x+ 25 www-data www-data    4096 Jul 21 11:15 pics/
**-rw-------   1 www-data www-data       0 Jul 14 10:39 pThumbKM3b2M
-rw-------   1 www-data www-data 2499747 Jul 14 10:39 pThumbsIv9Qi**
-rw-r--r--   1 root     root        3516 Jun  6 11:00 README.md
drwxr-xr-x   9 root     root        4096 Jun  6 11:00 src/
drwxr-xr-x   3 root     root        4096 Jun  6 11:00 user/
seehma commented 7 years ago

Hi there, First, thanks for the fast answer. The webserver should be able to write there because he can create the config files for himself. I think i found the problem. Digging in the code and looking at the part where the thumbs should be generated brought me to the point that the webserver (PHP) need imagemagick (its obvious but i didnt think about it), so i looked at my phpinfo() and i could not found an entry with imagemagick. I thought that this would also work without imagmagick but now i dont think so. Now i am uploading the pics with the same name a second time in the thumbs folder, it is working fine for me. But maybe this would be an idea for all who do not have installed imagemagick and also have no chance to do it.

Are my implications true?

There was a second problem => when you have Warnings in the script which brings you the picture back into the <img src tag the picture cant also be shown.

Best Matthias