(SOLVED) Getting errors when generating thumbnails

Phoca Gallery - image gallery extension
jicejice
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 23 Dec 2012, 20:16

(SOLVED) Getting errors when generating thumbnails

Post by jicejice »

Hi everyone,

We just switched servers and our site works fine except the multiple upload feature.

For thumbnails generation... We get the following error :

Code: Select all

Warning: file_put_contents(/data/customers/xxxx/html/images/phocagallery/xxxx/thumbs/phoca_thumb_s_un-test.jpg): failed to open stream: Permission denied in /data/customers/xxxx/html/libraries/joomla/filesystem/file.php on line 418 Warning: file_put_contents(/data/customers/xxxx/html/images/phocagallery/xxxx/thumbs/phoca_thumb_m_un-test.jpg): failed to open stream: Permission denied in /data/customers/xxxx/html/libraries/joomla/filesystem/file.php on line 418 Warning: file_put_contents(/data/customers/xxxx/html/images/phocagallery/xxxx/thumbs/phoca_thumb_l_un-test.jpg): failed to open stream: Permission denied in /data/customers/xxxx/html/libraries/joomla/filesystem/file.php on line 418
We figured it has to do with access rights to folders on the server during thumbnail generation and contacted our host without success. We tried to manually chmod the images folder recursively to 755 (including the phocagallery folder, the pgpluploadetc folder, etc). Still does not work. We think it probably is because of the ownership and rights of the files and folders. Joomla/Phoca would create temp and files without authorization during thumbs generation and the server blocks that.

File formats are OK, they are not corrupt, GD library is on, SafeMode is on.

UPDATE : the host has accepted to deactivate SafeMode, no change, still the same problem. SafeMode is back on.
UPDATE : GD library has been tested and works fine.
UPDATE : absolute path to tmp folder OK.

Now, our plan is to try and activate Joomla's FTP layer (we have 2.5.8 BTW) and see what happens but that solution seems a bit radical...

UPDATE : Activated the FTP layer : still no change...

UPDATE : Aaaaaannd answering myself :-)... We managed to make it work !

To those interested this is how :

1) we activated the FTP layer. The server host has to be left at 127.0.0.1
2) we modified the paths to all 3 directories mentioned in Site Configuration to make them relative as follows :

"/data/customers/xxxx/tmp" was replaced by "/tmp" in tmp path (server tab)
"/data/customers/xxxx/html" was replaced by "/html" in FTP path (server tab)
"/data/customers/xxxx/logs" was replaced by "/logs" in logs path (system tab)

The multiple upload (Java) works again as well as thumbnail generation !

It is not totally "clean" as the folders we create via Phoca within /images to organise our uploads do not appear in FTP and can only be deleted (if needed) via the Media Manager.

Hope this helps others... Apparently this path/permissions problem that existed in Joomla! 1.5.x has resurfaced with 2.5.x with very restrictive hosts...

Merry Xmas everyone !
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49149
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: (SOLVED) Getting errors when generating thumbnails

Post by Jan »

Hi, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply