All the sudden, all the image nodes are spitting out this error wherever the image is used:
* warning: imagejpeg() [function.imagejpeg]: Unable to open 'sites/ default/files/images/<filename>.thumbnail.jpg' for writing in /includes/ image.inc on line 321. * Unable to create scaled thumbnail image
The only way to remedy this, I found so far, is to reupload each images to the node. I started to doing it but there are hundreds of them, and I start to think there must be a better way...?
On Monday 28 May 2007 21:37:35 A-NO-NE Music wrote:
All the sudden, all the image nodes are spitting out this error wherever the image is used:
- warning: imagejpeg() [function.imagejpeg]: Unable to open 'sites/
default/files/images/<filename>.thumbnail.jpg' for writing in /includes/ image.inc on line 321.
- Unable to create scaled thumbnail image
The first thing to do is to make sure the path exists and that it is writable by your webserver. Did that setting get changed in your configuration recently?
Jason Flatt / 2007/05/29 / 09:01 AM wrote:
The first thing to do is to make sure the path exists and that it is
writable
by your webserver.
Yes, I did that as the first thing. Sorry I should had mentioned. Besides the error points to only thumbnail version, the directory showed all 3 versions of each image as expected. The directory has been set to 777 (I have to ask permission issue when I finish trial-n-error building process).
Nothing has changed that would cause image related node to flip since I finished image gallery thing two days ago, while everything I have been doing with Drupal is trial-n-error so I don't know if I have done something that bad.
On 5/29/07, A-NO-NE Music madflute@anonemusic.com wrote:
Jason Flatt / 2007/05/29 / 09:01 AM wrote:
The first thing to do is to make sure the path exists and that it is
writable
by your webserver.
Yes, I did that as the first thing. Sorry I should had mentioned. Besides the error points to only thumbnail version, the directory showed all 3 versions of each image as expected. The directory has been set to 777 (I have to ask permission issue when I finish trial-n-error building process).
Nothing has changed that would cause image related node to flip since I finished image gallery thing two days ago, while everything I have been doing with Drupal is trial-n-error so I don't know if I have done something that bad.
No idea what it could be, but here is what I would try:
a) Look at an existing file which does not work and at a file which you re-uploaded and works. Compare - their directory paths, - their file permissions, and - most importantly, their owners (apache or you?)
b) Search in the database for all occurrence of those two filenames and look for any differences with - their paths or any other fields - tables where only one of the filenames exists.
c) Just to be safe, clear the cache table, your tmp directory, your files/images/temp directory (if any).
Quoting A-NO-NE Music madflute@anonemusic.com:
Jason Flatt / 2007/05/29 / 09:01 AM wrote:
The first thing to do is to make sure the path exists and that it is
writable
by your webserver.
Yes, I did that as the first thing. Sorry I should had mentioned. Besides the error points to only thumbnail version, the directory showed all 3 versions of each image as expected. The directory has been set to 777 (I have to ask permission issue when I finish trial-n-error building process).
What about the files in the directory? If you're trying to replace a file then Apache needs write access to the file.
Earnie
Quoting A-NO-NE Music madflute@anonemusic.com:
All the sudden, all the image nodes are spitting out this error wherever the image is used:
- warning: imagejpeg() [function.imagejpeg]: Unable to open 'sites/
default/files/images/<filename>.thumbnail.jpg' for writing in /includes/ image.inc on line 321.
- Unable to create scaled thumbnail image
The only way to remedy this, I found so far, is to reupload each images to the node. I started to doing it but there are hundreds of them, and I start to think there must be a better way...?
Sounds to me as if for some reason the permissions for Apache to write to the directory or overwrite the file has been modified. You might need to contact your hosting company if you don't have access to reset the permissions.
Earnie
Earnie Boyd / 2007/05/29 / 09:50 AM wrote:
Sounds to me as if for some reason the permissions for Apache to write to the directory or overwrite the file has been modified. You might need to contact your hosting company if you don't have access to reset the permissions.
Yes, I did have the permission problem, which has been corrected by my ISP early yesterday. I too did hope that fixed the problem, but it is still present. I really wish to find which table stores this info so I can fix it there.
On Tuesday 29 May 2007 06:56:18 A-NO-NE Music wrote:
Earnie Boyd / 2007/05/29 / 09:50 AM wrote:
Sounds to me as if for some reason the permissions for Apache to write to the directory or overwrite the file has been modified. You might need to contact your hosting company if you don't have access to reset the permissions.
Yes, I did have the permission problem, which has been corrected by my ISP early yesterday. I too did hope that fixed the problem, but it is still present. I really wish to find which table stores this info so I can fix it there.
File permission information is not stored in the database. That is something that is at the file level.
You have two issues to check here: 1) the owner and group of the file, and 2) the permissions of the file. If the file's owner and/or group have write permission, but isn't the same owner and/or group that the webserver is running as, then your file won't get updated.
A couple of other things to consider are that files _and_directories_ need to have the proper permissions set, and while a permission level of 0660 (that gives the owner & the group read & write access) should be adequate, you could have the directory and files set to 0777 (that gives everyone [owner, group & other] full access [read, write & execute]) just to verify if that is actually the problem or not.
Thanks everyone. Since I have had weird permission issues before, it was the first thing to check, and that was not the issue.
I ended up with re-uploading all the image files to remedy this problem. Took me all night, tho.
I then realized I _did_ change something yesterday which I totally forgot about it. I added another instance of IMAGE SIZE under Site Config > Image. This must have done something bad. Is this a bug that I should report?
This sounds very much like the problem I have on blog.shostak.net. I had it on another site, and fixed it by resetting the image options to default, but I don't want to do that on my blog. I'm getting no such file messages for the thumbnail and preview of every image. Is there anything already reported about this for the image module in the issues area? I was hoping it would go away when I move the site form 4.7 to 5.
Jean
On 5/29/07, A-NO-NE Music madflute@anonemusic.com wrote:
Thanks everyone. Since I have had weird permission issues before, it was the first thing to check, and that was not the issue.
I ended up with re-uploading all the image files to remedy this problem. Took me all night, tho.
I then realized I _did_ change something yesterday which I totally forgot about it. I added another instance of IMAGE SIZE under Site Config > Image. This must have done something bad. Is this a bug that I should report?
--
- Hiro
Hiroaki Honshuku, A-NO-NE Music, Boston, MA http://a-no-ne.com http://anonemusic.com
-- [ Drupal support list | http://lists.drupal.org/ ]