found a problem with imagecache not creating thumbs in drupal

I was building a site for a client and all imagecache stopped working before I uploaded to the live server.

When I uploaded, all of a sudden imagecache stopped working. I checked the usual things (permissions, original image exists) and everything was fine.

After some debugging I found that:

  • imagecache_cache() checks to see if the file exists using file_create_path()
  • file_create_path() checks the temp directory before it checks the files/ directory using file_directory_temp()
  • file_directory_temp() gets the temp directory using variable_get('file_directory_temp', NULL)

Great! So I go into the variables table and delete file_directory_temp.

But the problem is still there. Mre debugging:

  • variable_get() can load variables from cache and not from the database using cache_get('variables', 'cache')

Ok, so I go into the cache table and delete variables.

Problem Solved!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thank you so much! you solved a problem that I was tryin' solve for weeks !!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <i> <strong> <cite> <em> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <css>, <diff>, <drupal5>, <html>, <javascript>, <php>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.