First question: I've not got time to look at it in detail at the moment but can tell you where to look. In the last update Jazzman added a whole set of error-handling checks. Look at the beginning of function CreateThumb around line 176. You're obviously getting the third error message. You're getting the big picture because Jazzman added a line in GetAttachmentsString to check if the thumbnail exists - if not it shows the main image.
Second question: You mean the ATTACHMENT_ALLOWED_FILETYPES array, I guess? The upload and the matching against file type is handled by vanilla in Framework.Class.Uploader.php (the error message you get is from there). If you take out GIF you can't upload gif images with a .GIF file extension in capital letters. The file and the thumbnail is saved on the server with the extension in lower case using strtolower.
Wow! hutstein! Nasty typo you found!! Tnx!! I've immediatly changed it! I've also added new filetype icons which jakob provided me (from www.famfamfam.com).
I've uploaded a new release: version 1.2c
I'm still thinking about how to get a relative path in the Lightbox javascript, because this:
$Head->AddScript('blah.js?root=' . urlencode($this->Context->Configuration['WEB_ROOT']))
doesn't work... The Vanilla class rejects it and returns '0'
Hi there. Finally managed to download and install Vanilla 1.0 and am testing the new extension.
Will display thumbnails but not large versions of the images.
The permissions on uploaded images and files are set to 600 (cannot be viewed directly in the browser).
Thumbnails are set to 644
Any clues? Thanks
If I turn lightbox and thickbox off and click on the created thumb, get message
Forbidden
You don't have permission to access /mik2/uploads/5.bmvlogo.gif on this server.
This is the point - for some reason, as the file is being uploaded, the permissions are being set incorrectly. The directory is writeable (obviously) but the file is not being given read or write permissions to other. Any suggestions?
Oh. I see. Sorry i was a bit mixed up. Assuming apache has ownership of the file it should be alright actually. Have you tried recursively setting the upload dir to 644?
Curious - my FTP client won't let me alter the permissions for the /uploads/thumbs dir or the files in the /uploads directory. Maybe some kind of ownership issue?? Not an expert at all this!
Sometimes, when using scripts that upload files via browser, I've witnessed that ownership of upload folders and files created changes hands to apache. Briefly reading through only the last few comments, I think that's probably what happened. If you have an option with your ftp client, see if you have an option to see "owner/group" fields on the remote host, this will tell you everything.
I use Vanilla's Uploader class for uploading images. I think Mark is still struggling with file permissions (read on his Swell blog). I could cheat and add chmod to manually change file permissions, but I think it would be better if Mark implements it into the Framework.
I think you want to do a chown back to the default owner rather than allowing apache or whatever user the files/folders are being assigned to. Keep chmod at the standard 644 to prevent any potential malicious activity :)
-rw------- 1 dbrazil dbrazil 2719 Jun 1 15:21 6.face01.jpg
-rw------- 1 dbrazil dbrazil 5510 Jun 1 15:23 7.image.jpg
-rw------- 1 dbrazil dbrazil 275413 Jun 1 15:26 8.gallery-final size.jpg
drwxrwxrw- 2 dbrazil dbrazil 4096 Jun 1 15:26 thumbs
These are the uploaded images in the new /files dir
All seem to be owned by me but permissions wrong.
inside thumbs:
-rw-r--r-- 1 dbrazil dbrazil 3940 Jun 1 15:21 6.face01.jpg
-rw-r--r-- 1 dbrazil dbrazil 4000 Jun 1 15:23 7.image.jpg
-rw-r--r-- 1 dbrazil dbrazil 4406 Jun 1 15:26 8.gallery-final size.jpg
permissions set ok.
Will keep trying...
Comments
First question: I've not got time to look at it in detail at the moment but can tell you where to look. In the last update Jazzman added a whole set of error-handling checks. Look at the beginning of function CreateThumb around line 176. You're obviously getting the third error message. You're getting the big picture because Jazzman added a line in GetAttachmentsString to check if the thumbnail exists - if not it shows the main image.
Second question: You mean the ATTACHMENT_ALLOWED_FILETYPES array, I guess? The upload and the matching against file type is handled by vanilla in Framework.Class.Uploader.php (the error message you get is from there). If you take out GIF you can't upload gif images with a .GIF file extension in capital letters. The file and the thumbnail is saved on the server with the extension in lower case using strtolower.
if( $ImageType = "jpg") $ImageType = "jpeg";
this must be
if( $ImageType == "jpg") $ImageType = "jpeg";
I've uploaded a new release: version 1.2c
I'm still thinking about how to get a relative path in the Lightbox javascript, because this:
$Head->AddScript('blah.js?root=' . urlencode($this->Context->Configuration['WEB_ROOT']))
doesn't work... The Vanilla class rejects it and returns '0'
Strange how you're the first guy to experience this though. It's up to jakob/jazzman i guess.
what are the permissions of the /uploads folder and who's the owner of /uploads and /uploads/thumbs?