forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: dianajameson on August 11, 2010, 05:27:46 pm

Title: Resizing Thumbnails from pictures NOT in Albums folder
Post by: dianajameson on August 11, 2010, 05:27:46 pm
I am using V1.5.6

My site is huge and has 1,000's of albums. When I first starting using Coppermine I placed my image folders on my server in /coppermine/albums/userpics

About a year ago following a software update I started to put the image folders on my server in /copprmine/albums NOT the subfolder /userpics

I now wish to resize my thumbnails and have been using the admin tools thumbnail resize function.

If I try and resize thumbnails from pictures in folders in the /coppermine/albums folder everything works fine...... BUT

If I try and resize the thumbnails from pictures in the folders in the /coppermine/albums/userpics folder everything APPEARS to work (no error messages) but the thumbnails haven't actually been resized !

Any ideas would be greatly appreciated.

Is it right that the pictures will only be resized if they are in the /albums/xxx folder and NOT if they are in /albums/userpics/xxx folder? which appears to be the case.


I cant give you access the the actual site as it is protected in a 'members area'

Title: Re: Resizing Thumbnails from pictures NOT in Albums folder
Post by: Nibbler on August 11, 2010, 06:40:17 pm
Probably means the files and/or the userpics folder itself is not writable. Check the permissions on it and compare them with the permissions on the files and folders that do work.
Title: Re: Resizing Thumbnails from pictures NOT in Albums folder
Post by: dianajameson on August 11, 2010, 11:17:39 pm
Both /albums and /albums/userpics are ChMOD to 777 as are all the subfolders

Any other ideas? I really cant figure it out - it seems strange the admin tools ->resize funsction seems to run without throwiing up any errors and completes with an 'all ok' message when in fact no resizing apperas to have taken place - unless the folder is a sub-folder of /albums

Weird?????
Title: Re: Resizing Thumbnails from pictures NOT in Albums folder
Post by: dianajameson on August 12, 2010, 02:23:57 am
It gets more interesting!

I have looked further into the permissions aspect of the problem.

When I try and resize the thumbnails in some albums I get the following debug info and the resize doesnt take place

/include/picmgmt.inc.php

    * Warning line 445: touch() [function.touch]: Utime failed: Operation not permitted
    * Warning line 446: fopen(albums/set1095/thumb_DSC_2349.JPG) [function.fopen]: failed to open stream: Permission denied
    * Warning line 447: fclose(): supplied argument is not a valid stream resource
    * Warning line 522: imagejpeg() [function.imagejpeg]: Unable to open 'albums/set1095/thumb_DSC_2349.JPG' for writing
    * Warning line 529: chmod() [function.chmod]: Operation not permitted

But...... with other albums I get no errors at all and the resize happens.

ALL albums are CHMOD to 777

If I manually CHMOD the thumbnail files in my folder to 777 the resize works every time.

Can anyone explain why some thumbnails are resized even though they are CHMOD 644 and others need to be 777?

Title: Re: Resizing Thumbnails from pictures NOT in Albums folder
Post by: papukaija on August 12, 2010, 10:25:28 am
Maybe you should contact your hosting company for support. Please also verify the file/folder permissions from cpg's config. In addition, you need to post a link to your gallery (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616) as requested by board rules.
Title: Re: Resizing Thumbnails from pictures NOT in Albums folder
Post by: phill104 on August 12, 2010, 12:19:51 pm
If I manually CHMOD the thumbnail files in my folder to 777 the resize works every time.

Can anyone explain why some thumbnails are resized even though they are CHMOD 644 and others need to be 777?



Yes, it is down to ownership of the files. It all depends on how you uploaded them, via ftp or via the coppermine uploader. Files uploaded via ftp will have one owner while files uploaded via coppermine will have another. This can also happen if you move hosts or folders. What file permissions are required for each owner to write relies on your hosts settings. It can be a pain in the neck if your host has not se things up in a user friendly way.

More information can be found here - http://www.linuxforums.org/articles/file-permissions_94.html