Me again.

Although the temp/path problems were fixed up recently, there's still problems (on my site, at least) with personal image galleries. I get the old "unable to open image images/temp/blahblah" error whenever a user attempts to upload to their gallery. Was this forgotten about or missed in the recent CVS changes, or is it a seperate issue?

Also on the topic of personal galleries, if you allow users to have a gallery but don't allow them to upload into the site galleries, they still see a taxonomy selection drop-down when they try to upload images.

Comments

bruno’s picture

Category: bug » support

Could you give us more details about your configuration?

The second part of this issue has been transfered to a new one

ixis.dylan’s picture

Title: Uploading to personal image gallery broken » Previewing an image before submitting causes errors

Oops...

It only breaks if I preview an image node before I submit it. It's not related to personal galleries (sorry), and happens with any image type if you first preview and then submit the node. Perhaps something isn't being passed from the form correctly?

I'm using a recent version of the module from CVS. It was recently patched or edited to fix a very similar error that people were experiencing whenever any file was uploaded.

Here's an example of the errors I get:

warning: filesize(): Stat failed for images/temp/tmpimg_forum-closed.png (errno=2 - No such file or directory) in /home/demolici/public_html/modules/image/image.module on line 610.

warning: Division by zero in /home/demolici/public_html/modules/image/image.module on line 1210.

warning: Division by zero in /home/demolici/public_html/modules/image/image.module on line 1212.

And this is the error that the module outputs:

unable to open image images/temp/tmpimg_forum-closed.png

Thanks.

bruno’s picture

I see that you are using the option that uses original file name for uploaded files. Could you try to change the option to "random" and tell me if you experience the same problem? Also, do you use Imagemagick? On which platform, Linux, Windows, etc? Thanks.

bruno’s picture

Linux, of course :-)

ixis.dylan’s picture

I get the same error with random names enabled.

http://www.demolicious.org/info.php for my phpinfo output.

The preview works okay, and the image is displayed on that page. The error appear when I go from preview -> submit.

bruno’s picture

Do you have image AND thumbnail displayed on the preview page? Have you checked access rights on the folder configured under "Default image path"?
From your phpinfo() I see that open_basedir is set. If you are using ImageMagick, what is the path to convert? Any error reported with administer->images?

ixis.dylan’s picture

There's no errors reported on any of the admin pages.

The thumbnail appears on the preview page, but not the full image. (Is it supposed to be?)

The correct values are filled in for the manipulation fields (width, height), and all the other fields are populated in the same way as they were on the node/add/image page.

My IM path is /usr/bin/convert , and it works everywhere else in the module.

Version: ImageMagick 5.5.7 07/29/03 Q16

The image directories are each chmod 777 , but I've just noticed that the files are being created inside them with permissions set to 644, with the owner/group as "99/99". All other files in the web directory are set to "32011/demolici". I'm using a shared hosting account, so I assume that the permissions are being set this way to avoid security problems when Apache is running as "nobody". Files uploaded with the "upload" module in Drupal CVS have the same permissions as files uploaded with the image module.

stevew’s picture

Title: Previewing an image before submitting causes errors » Similar problem with Directory Upload Slow
Category: support » bug

I fought my way through the image module setup, taking down problems with directory permissions, the path to ImageMagick, etc. I can now upload images individually. Directory Upload: Fast works, but Directory Upload: Slow is broken.

Here's what happens now:

1) I upload a bunch of pictures to a temporary directory on my web server.

2) I change the permission on the temporary directory to 777 (so that rename will work right).

3) I do the Directory Upload: Slow from the image module. This gets me a list of filenames, each of them is a link to an image preview page. There are no error messages on this page.

4) I follow one of the picture links to the image preview page. The page shows the thumbnail, and this page also has no errors. The filename box is blank. I fill out all the other fields (taxonomy, node name, description of the image, etc.)

4) It doesn't matter if I press Submit or Preview next, the same thing happens. I get the image preview page, now including the full size image, but the filename box is outlined in red and the error at the top says I don't have a valid image name.

To me this sounds like the same issue mentioned above, that the preview function is not keeping track of where the picture is after it is already on the server.

Bèr Kessels’s picture

Component: Code » gd toolkit
Status: Active » Closed (fixed)

Closing this issue, because we now have a new image module. Please re-open if that new module gives you the same problems.