I did a fresh install of Drupal on a friend's site on my server. I have 4.2.0rc on another domain on the same box. I followed Install for the image module which works fine on the other domain. I have permissions on thumb, image, and temp folders set to 777. I have the path to imagemagick correctly set. In other words, I have the exact same config in modules for both domains. Difference between 2 is release version of Drupal and I am using the 4.2.0 version of images on the new domain.

Here are messages I get. Keep telling me no permission, but know permissions are set to 777. This is when I try to upload an image.

I am getting a SQL error as well:

user error: You have an error in your SQL syntax near '} i, {node} n WHERE i.personal = 1 AND i.nid = n.nid AND n.uid = 1' at line 1
query: SELECT COUNT(*) AS c, SUM(i.filesize) AS size FROM {image} i, {node} n WHERE i.personal = 1 AND i.nid = n.nid AND n.uid = 1 in /home/virtual/site88/fst/var/www/html/includes/database.mysql.inc on line 75.warning:

rename() failed (No such file or directory) in /home/virtual/site88/fst/var/www/html/modules/image.module on line 640.

Comments

bruno’s picture

Which version of image module are you using?
If this is the latest from CVS, I guess this may explain your problems with Drupal release 4.2.0. The CVS version has been updated to support the table prefixing feature of current Drupal CVS version.
I would suggest that you grab from CVS the image module with DRUPAL-4-2-0 tag (Should be version 1.51.2.1).

Bruno

Anonymous’s picture

I have tried both, but not sure if uninstall was clean. Originally trie the 4.2.0 version and had permission problems. Now have CVS, so probably why that may be case. I did notice a few other posts on a prob with image on 4.2.0.

bruno’s picture

Are you using ImageMagick? I read that other people had problem with it.
Unfortunately, I'm using only GD myself, so I can't check. All I can say is that it works fine with GD on a fresh install of Drupal 4.2.0 and 4.2.0 version of image.module

Bruno

Anonymous’s picture

A lot of people are having the same problems with the image module working with 4.20 but none are being answered.

Has this been answered somewhere else before, thats why nobody wants to answer it. Please, if someone has seen it answered some where else before, please direct me to it. I search the documentation, forums and tried all different versions of image module old to cvs but couln't get it to work on a fresh install of 4.20. I got the same message as above and using cvs image module ouputs another set of error messages.

Thanks

Anonymous’s picture

Line 626 in 4.2.0 image.module is:

      $result = db_query("SELECT n.nid, n.teaser, i.thumb_path FROM {image} i, {node} n WHERE i.nid = n.nid AND n.nid IN ('".implode("','", array_map("check_query", $match[1]))."')");

The fix is to change {image} to image and {node} to node, i.e.:

      $result = db_query("SELECT n.nid, n.teaser, i.thumb_path FROM image i, node n WHERE i.nid = n.nid AND n.nid IN ('".implode("','", array_map("check_query", $match[1]))."')");

I'll go look for a bug and file one if not...

Hope this helps a few folks. I found this thread when I hit the same problem (Day 2 on Drupal).

Anonymous’s picture

I've logged a bug, http://drupal.org/node/view/2619, for this.

joe lombardo’s picture