Drupal ver 5.19
When I as an admin upload a picture or when one of my users uploads a picture we get the following error...
warning: imagejpeg() [function.imagejpeg]: Unable to open 'files' for writing: Is a directory in /home/content/p/h/o/photojeffery04/html/includes/image.inc on line 339.
On my admin account I still see the picture and everything looks fine. On the user account and to the open public the picture is not displayed only the Header and message text.
line 339 in image.inc states...
return $close_func($res, $destination, variable_get('image_jpeg_quality', 100));
I do not know how this applies to this error message.
Permissions set on the 'files' directory is 777 and on the 'images' directory is 777, so I am not sure why I am getting this message. Plus I am not sure this is a smart thing either, but I changed it based on this error message in the hopes it might resolve it.
I am a newbie when it comes to this stuff. I have read many issues similar to this and have not come up with a solution yet that works for me. Any ideas from you guys would be much appreciated.
Comments
Comment #1
joachim commentedSounds like the value of $destination is wrong -- as the error says, it's a directory rather than a filename.
If you can debug, try seeing what that value is and where it came from.
Comment #2
photomanjeffery commentedHow can I debug when it is hosted remotely? I suppose I could install apache and mysql server on my local machine, download all the files from the hosting site and then debug them, but frankly that would be a lot of work, some major changes with the mysql server to get that working and other issues I am sure I have not thought about. There has to be an easier way. Plus this was working when I was just testing the site, then when I made the final changes aesthetically before I was going to make it live I/that somehow broke it.
For the most part it is a flickr like site, using the flickr for drupal guide found here.
http://www.lullabot.com/articles/how_to_build_flickr_in_drupal
The only change to this guide I made is I added Image Gallery as a place to store the images and the minor changes required for the newer version of drupal. I am not sure if that caused the problem or not.
Finally as for the destination, do I not want it to be a folder? The file names would be determined by what was uploaded, would they not? Sorry for my ignorance, as I stated above I am a newbie when it comes to this stuff. I am a throw back from html days, what I worked around in the late nineties and now after being out of web page business for more then a decade I have a large learning curve ahead of me. Thank you for your patience.
Comment #3
joachim commentedimagejpeg() needs to be given a filename to write, not a directory -- this would need to be constructed from the folder + the uploaded file.
Running a local copy of a site is generally good practice, for debugging as well as trying out new modules and updates.
Without seeing what value is coming through and where it comes from I can't make any progress on this issue.
Comment #4
sunSorry, without further information this issue can only be marked as won't fix.
Feel free to re-open this issue if you want to provide further information. Thanks.