Drupal 6.19
PHP 5.2.16
A problem I have had consistently with my Drupal installation since beginning the project has been some kind of permissions problem with imagecache. Perhaps this already exists as an issue - feel free to mark as a duplicate.
When a registered (but non-admin) user uploads an image using the FileField>Image widget, the original file is correctly saved and is viewable by all, but when the node is displayed for all but the administrator (including anonymous users), there is a broken file icon where the resized imagecache file should be displaying. Accompanying this is a watchdog entry for each occurrence. Example:
| Type | imagecache |
|---|---|
| Date | Monday, February 14, 2011 - 6:56pm |
| User | Lynn McNamee |
| Location | http://www.eastendhouse.org/sites/default/files/imagecache/cfc-participant-logo-small/GreenStreet.jpg |
| Referrer | http://www.eastendhouse.org/cooking-for-a-cause/2012 |
| Message | 404: Unable to find GreenStreet.jpg |
| Severity | error |
| Hostname | 68.165.149.98 |
| Operations |
To remedy this, I must login as the site administrator and view the node, which instantly "fixes" those files permanently for all users. I assume at this point the resized files are successfully created, as they are available to all users at any point in the future from that point.
I've made sure all the permissions of available to all users for imagecache. I am using Clean URLs, as well.
Also to note, I am using some RewriteEngine settings in the .htaccess file. Perhaps these are causing the problem? Either way, this is a serious issue.
# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
RewriteCond %{HTTP_HOST} ^eastendhouse\.org$ [NC]
RewriteRule ^(.*)$ http://www.eastendhouse.org/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
Comments
Comment #1
amaisano commented*bump*
Comment #2
fizk commentedPlease reopen if this is still an issue with ImageCache 6.x-2.0-rc1.