0
votes

I'm using Imagecache with Drupal 6, (have been for several years) and am seeming to have a new issue where when I create a new image preset, the images will not generate properly, and I don't understand why. All my existing ones previously work just fine, but any newly created (not sure when the 'newly created' started...) ones do not work, even the little image style preview on the imagestyle creation page doesn't load properly.

I checked my log and get the following error, and can't find anything helpful online for what it means or how to resolve it:

Warning: imagepng(): SAFE MODE Restriction in effect. The script whose uid is 10002 is not allowed to access /var/www/vhosts/mysite.com/httpdocs/drupal/sites/default/files/imagecache/NDW_Collection_Header owned by uid 48 in imageapi_gd_image_close() (line 74 of /var/www/vhosts/mysite.com/httpdocs/drupal/sites/default/modules/imageapi/imageapi_gd.module).

I've changed all permissions in /tmp and /files and subdirectories to 777 and still no luck as far as I can tell. I'm not sure what to try, the site is fairly fragile, so I'm not sure I can even try updating or reinstalling the module, for fear of breaking something else on the site.

ImageAPI GD2 is enabled in modules, and the folders in imagecache directory ARE being created, just the actual thumbnails/images themselves are not being created, and I get the above error right after trying to load a page that contains those thumbnails.

Any suggestions?

1

1 Answers

0
votes

Alright I think I did figure it out... maybe this will help someone else.

It is still a permissions issue, in the site's directory.

imagecache/newpreset is getting created by drupal, but for some reason the user is set as 'apache' which I'm not able to change permissions for, so even though I thought I was changing the directory's permissions, they were stuck at 774 instead of 777 , and it was failing. I am sure there's a better way to handle it, but I would go in and create the folders myself via FTP vs. letting Drupal create them, then set my permissions, and it seems to be working okay.

I guess the ideal solution here though, is to figure out why/how to change the fact that Drupal is now creating the new imagecache folders under the user 'apache' vs 'myusername' that it should be!