Album 0.6.0 on WAMP - Permission denied error

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Album 0.6.0 on WAMP - Permission denied error

Post by Darwin Web Design »

Hi
I've just installed album 0.6.0 on CMS 1.3 Canary on my local WAMP testing server.

Just trying to set up an album and everything goes fine until I try to add the photos to the gallery I've created:

Warning: getimagesize(c:\wamp\www\site/uploads/images) [function.getimagesize]: failed to open stream: Permission denied in c:\wamp\www\site\modules\Album\lib.functions.php on line 104

Not sure how to tackle this one?  Any help appreciated...

Thanks  :-[
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

Aussie Gecko wrote: Hi
I've just installed album 0.6.0 on CMS 1.3 Canary on my local WAMP testing server.

Just trying to set up an album and everything goes fine until I try to add the photos to the gallery I've created:

Warning: getimagesize(c:\wamp\www\site/uploads/images) [function.getimagesize]: failed to open stream: Permission denied in c:\wamp\www\site\modules\Album\lib.functions.php on line 104

Not sure how to tackle this one?  Any help appreciated...

Thanks  :-[
Hmm.. That shouldn't happen it seems like it is trying to get the size of a directory.

The line it's talking about is:
list($width, $height, $type, $attr) = getimagesize($config['uploads_path'].'/images'.$row['thumbnail_path']);
So it seems that the "thumbnail_path" may be empty.

Do the images show up correctly when you are editing the Album?

I think I will boot into Windows and try installing WAMP and see if I can reproduce this problem.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

Elijah Lofgren wrote: I think I will boot into Windows and try installing WAMP and see if I can reproduce this problem.
Reproduced, working on fix now.  :)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

Elijah Lofgren wrote:
Elijah Lofgren wrote: I think I will boot into Windows and try installing WAMP and see if I can reproduce this problem.
Reproduced, working on fix now.  :)
It seems this error only shown when the thumbnails couldn't be generated for some reason. I guess I'll just add a check to only calculate the size if the thumbnail file exists. This will not fix the reason that the thumbnails were not generated though.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

I have just make some changes that should fix your problem:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
Log Message:

If the thumbnail cannot be created then just use the picture as the thumbnail with a width of 96px.

This should fix the problem reported here:
http://forum.cmsmadesimple.org/index.ph ... 986.0.html

Store Thumbnail width in database instead of calculating it every time Album is viewed.

Increase version number to 0.6.1-svn
You can either upgrade to Album 0.6.1-svn or wait until I release a new version. I'll hopefully release a new one after I've tested my changes a little more.

Hope this helps,

Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Darwin Web Design »

Hello,
Sorry I haven't replied recently (long weekend here in Australia).  Thank you for investigating and fixing.  Can you tell me how I go about upgrading a 'svn' (I've never done this and don't even know what 'svn' is).  I've had a look at the link and see a list of files.  Do I just replace those new files to my server?  (I'm thinking that is the obvious but want to check...)

Thank you  ;D
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

Aussie Gecko wrote: Hello,
Sorry I haven't replied recently (long weekend here in Australia).  Thank you for investigating and fixing.  Can you tell me how I go about upgrading a 'svn' (I've never done this and don't even know what 'svn' is).  I've had a look at the link and see a list of files.  Do I just replace those new files to my server?  (I'm thinking that is the obvious but want to check...)

Thank you  ;D
SVN is just a way to keep track of changes to source files. More info here: http://subversion.tigris.org/

But, instead of making you go through all that, I've created an XML file that you can use easily install the SVN version of Album.

You can download it here: http://www.elijahlofgren.com/uploads/mo ... .1-svn.xml

More info about installing modules here: http://wiki.cmsmadesimple.org/index.php ... ns/Modules

Let me know how it goes,

Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Darwin Web Design »

Hi again Elijah
thanks for the xml file, I installed it and was really happy to see NO error message  ::)  I did a test of one album with about 50 photos.

When you select all the photos for the album is it normal to see something in the little thumbs when it takes you back to the album page in admin?  It actually shows a 1 pixel high preview rather than a full preview of the photo.  When I replace the thumbnail image with my manally enhanced thumb photo from the server, it then shows blank nothing. 

I am uploading all of the album photos at a fixed pixel width and then I upload the thumbs too (to a different folder) as I use software that batch resizes for me.  But I notice your module might create a thumbnail image? - would that be better?

In any case, they don't show in the preview - do you think it's something I'm doing wrong?  Thanks - great there's no error message now.

;D
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

Aussie Gecko wrote: When you select all the photos for the album is it normal to see something in the little thumbs when it takes you back to the album page in admin?  It actually shows a 1 pixel high preview rather than a full preview of the photo.
Should be fixed now:
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev
http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev

Here is an XML file with those fixes included:
Please download the latest Album release which includes this fix and more: http://dev.cmsmadesimple.org/frs/?group_id=167
Aussie Gecko wrote: When I replace the thumbnail image with my manally enhanced thumb photo from the server, it then shows blank nothing. 
Which file are you replacing? Is it an thumb_something.jpg file?

Aussie Gecko wrote: I am uploading all of the album photos at a fixed pixel width and then I upload the thumbs too (to a different folder) as I use software that batch resizes for me. 
Hmm.. If you are uploading the thumbnails to a different folder how are you telling Album to use those as the thumbnails? Are you using the "Change Thumbnail" link?
Aussie Gecko wrote: But I notice your module might create a thumbnail image? - would that be better?
It should create thumbnail images automatically, but on WAMP the extension used to create them is disabled by default.
However I just found a way to enable it.
1. Click on the WAMP icon in the system try.
2. From the menu that pops up go to "PHP extensions"
3. Click on the "php_gd2" entry.
4. WAMP will automatically restart the server and enable the php_gd2 extension. Now thumbnails should be genarated automatically.  :)


Hope this helps,

Elijah
Last edited by Anonymous on Sat Feb 17, 2007 3:49 am, edited 1 time in total.
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Darwin Web Design »

Hi again
Should be fixed now:
Thank you, I installed the updated one and the thumbs are now showing properly instead of the single pixel high ones.
Which file are you replacing? Is it an thumb_something.jpg file?
Yes, pretty much.  I just put my modified thumbs in another folder and search for each one and replace it.  Reason being I would like all my thumbs to be exactly the same size in pixels so my album page looks all lined up and pretty :)  My album has a mixture of landscape, portrait and all sorts of wierdly cropped sizes.
Hmm.. If you are uploading the thumbnails to a different folder how are you telling Album to use those as the thumbnails? Are you using the "Change Thumbnail" link?
Yes, its more time consuming but like them to be of uniform size/dimension.
It should create thumbnail images automatically, but on WAMP the extension used to create them is disabled by default.
However I just found a way to enable it.
Thanks for that, I have WAMP5 and didn't have a "PHP Extensions" option on my menu but I did a little hunt on Google and modified it the following way (Just putting it here for anyone else that may need this one day) :

I had to activate my GD library in the PHP.ini file. The file can be accessed from the WAMP menu in "Config Files", after opening php.ini,
                             
Search the following line of code:
;extension=php_gd2.dll
Remove the semicolon from the beginning of this line, to activate the GD library:
extension=php_gd2.dll

Restart WAMP.

After I did this, all the little tiny thumbs in the album showed against their file name - so it WORKED !! yay. :D


I would say everything is working thanks to your help!  Just one final query.  When I generate the album, ie select the 50 photos - and it puts all the thumbs of these images in the album page in admin, ready to comment etc they look like thumb sized photos (even though I will probably change with my pixel perfect modified ones) - but when you view the actual page in the website, these thumbs are actually full sized original photos and stretch the page out.

This isn't a big problem for me because I'm manually changing each thumb anyway - but thought I'd mention it...

Thank you for a wonderful module, I can see I will be using it heaps and shall now have a play with the CSS, hovering etc.  ;)
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am

Re: Album 0.6.0 on WAMP - Permission denied error

Post by Elijah Lofgren »

Aussie Gecko wrote: I would say everything is working thanks to your help!  Just one final query.  When I generate the album, ie select the 50 photos - and it puts all the thumbs of these images in the album page in admin, ready to comment etc they look like thumb sized photos (even though I will probably change with my pixel perfect modified ones) - but when you view the actual page in the website, these thumbs are actually full sized original photos and stretch the page out.

This isn't a big problem for me because I'm manually changing each thumb anyway - but thought I'd mention it...
I've changed the default template to include a width for the thumbnails which should keep them from showing very large if the thumbnails could not be generated (and thus the full size picture is used) and the stylesheet is not attached to the page.
See: http://viewsvn.cmsmadesimple.org/viewsv ... m&view=rev

Aussie Gecko wrote: Thank you for a wonderful module, I can see I will be using it heaps and shall now have a play with the CSS, hovering etc.  ;)
You're welcome. Glad you enjoy it. Dam was the original author and I have just improved on his excellent work.  :)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
wolle
Forum Members
Forum Members
Posts: 60
Joined: Wed Jun 07, 2006 6:49 pm

Re: Album 0.6.0 on WAMP - Permission denied error

Post by wolle »

Elijah Lofgren wrote:
Elijah Lofgren wrote:
Elijah Lofgren wrote: I think I will boot into Windows and try installing WAMP and see if I can reproduce this problem.
Reproduced, working on fix now.  :)
It seems this error only shown when the thumbnails couldn't be generated for some reason. I guess I'll just add a check to only calculate the size if the thumbnail file exists. This will not fix the reason that the thumbnails were not generated though.
hi and sorry for my bad english :)
i had the same problem with the gallery but i could fix it with your upgrades...
my question is now: could u find the reason for the error message?
i have made some tests on my local windows machine (xampp)... the result was that only 5 thumbs from ~80pics (resolution: 800x600) could be generated...
on my webserver (linux, normal apache) ~10 pictures could be generatet...
so i have testet it with a smiley package(~120pics) where every pic has a size of ~3kb...
the same... on my local machine ~12pics could be generatet and on my webserver even more...
but the crazy on this thing is that pics who could not generatet on my local machine could generated on my webserver...
so i cant understand what the problem is...
other scripts who also create thumbs from pictures (not on cmsms) dont make problems like your script...

indeed your upgrades are fixing the problem but i think its not the best resolution...
cause the users have a very long loading time...
but i believe in you and think u will fix the problem soon :)
for the time being i can life with your upgrates...
tell me if u know what the problem is...

greets
wolle
Last edited by wolle on Thu Aug 10, 2006 11:23 am, edited 1 time in total.
Post Reply

Return to “Layout and Design (CSS & HTML)”