I'm getting a message like this when I try to set up a new preset:

Table 'drupal.imagecache_preset' doesn't exist query: SELECT presetid, presetname FROM imagecache_preset ORDER BY presetname in...

Also not sure where to modify the htaccess file:
http://drupal.org/node/87275#comment-161680

Any help with this will be most appreciated!!

Regards,
Gus

Comments

openmind’s picture

Hi,

I pressume you are on Linux, Unix or a Mac. In which case you need to open up terminal and....

You need to .....

cd yourdrupaldirecory/files
ls -la

you should now be able to see .htaccess in the list of files displayed

then...

nano .htaccess

change the content of the .htacces file to ...

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options FollowSymlinks
<IfModule mod_rewrite.c>
 # RewriteEngine off
</IfModule>

Hope that helps,

Openmind

gusaus’s picture

i'm supposed to replace this...

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "(\.(engine|inc|install|module|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|Entries.*|Repository|Root)$">
  Order deny,allow
  Deny from all
</FilesMatch>

# Set some options.
Options -Indexes
Options +FollowSymLinks

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

# PHP 4, Apache 2
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

# PHP 5, Apache 1 and 2
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
</IfModule>

# Reduce the time dynamically generated pages are cache-able.
<IfModule mod_expires.c>
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the prefix www.
  # you can use one of the following settings to force user to use only one option:
  #
  # If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
  # RewriteRule .* http://www.example.com/ [L,R=301]
  #
  # If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
  # RewriteRule .* http://example.com/ [L,R=301]


  # Modify the RewriteBase if you are using Drupal in a subdirectory and
  # the rewrite rules are not working properly.
  #RewriteBase /drupal

  # Rewrite old-style URLs of the form 'node.php?id=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^id=([^&]+)$
  #RewriteRule node.php index.php?q=node/view/%1 [L]

  # Rewrite old-style URLs of the form 'module.php?mod=x'.
  #RewriteCond %{REQUEST_FILENAME} !-f
  #RewriteCond %{REQUEST_FILENAME} !-d
  #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
  #RewriteRule module.php index.php?q=%1 [L]

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id: .htaccess,v 1.73 2006/04/14 09:08:26 killes Exp $

with this....

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options FollowSymlinks
<IfModule mod_rewrite.c>
# RewriteEngine off
</IfModule>

if so, i wasn't even able to access the site after i made that change.

am i missing something?

many thanks!

---------------------------------------
Gus Austin

nedjo’s picture

You need to edit two lines in the .htaccess file, as explained in the modules' description, http://drupal.org/project/imagecache. Change the line

Options None

to

Options FollowSymlinks

and the line

RewriteEngine Off

to

#RewriteEngine Off.

Also, the database error suggests the needed tables weren't created. The easiest way to fix this is to install the devel module and use it's 'reinstall modules' functionality. Then be sure to turn off devel again if you're on a production server.

gusaus’s picture

My .htaccess file looks like this -
http://drupal.org/node/90224#comment-164838

I'm not finding these lines, thus I can't figure out where to make the changes:

Options None
RewriteEngine Off

I appreciate the assistance so far - and thanks again in advance!

---------------------------------------
Gus Austin

nedjo’s picture

Equivalent versions of two needed instructions look to be there in the default .htaccess file, so presumably no edits are needed. Ensure your tables are there and, seemingly, you should be good to go.

gusaus’s picture

The devel module did the trick in getting the tables back (thanks!) - unfortunately I'm now back to the first problem --

When I try to create an action (imagecache Administration), I'm prompted with a 'No input file specified.' message.

So if it's not a problem with the .htaccess file, uhhhh... guess it's back to the drawing board.

Thanks
Gus

---------------------------------------
Gus Austin

gusaus’s picture

Has anybody had that message when trying to create an action in imagecache? Any resolve on this would be much appreciated!

---------------------------------------
Gus Austin

cboshuizen’s picture

You were looking at the wrong file. There is the long on in the root of the drupal installation, and a short one in the files directory. Edit the short one in files.

Chris

gusaus’s picture

I can't believe it turned out to be so easy. Wondering if I'm the only fool who was looking at the wrong .htaccess file.

Thank you so much Chris!!!

---------------------------------------
Gus Austin