Hello,

I posted about this before and got some good ideas, none of which worked. Image module is installed, but when I try to set the path to the directory /sites/mysite.com/files/images, it tells me there is no such directory... except there is such a directory, it's writable by Drupal, and its permissions are all correct. The audio directory uses the /sites/mysite.com/files/audio directory so I know that directory is writable by Drupal. /images is configured exactly the same as /audio.

Does anybody have any idea of what might be going on here? Image module would work if I set it to the top-level files directory, but I would have to change the site configuration to do that and would lose all audio files as a result. What can I hack to make image see the subdirectory?

Thanks,
CharlieHipHop

Comments

jraper@groups.drupal.org’s picture

I am using 4.7, so the following might not apply to 5.x. But perhaps it might help.

The "base" files system path is set in the main admin >> settings (File system Settings) screen. This path is relative to your main Drupal path.

So, if (for example) the main Drupal index.php file is installed at "/home/drupal/www" and your File system path in admin >> settings is set to "sites/mysite.com/files" (notice - NO leading or trailing "/"), then the absolute path to your site's files folder is "/home/drupal/www/sites/mysite.com/files".

Now, in order to set your image path to "/home/drupal/www/sites/mysite.com/files/images", all you need to do is put "images" (again - NOT leading or trailing "/") in admin >> settings >> image (Default image path) screen. In order words, image path is relative to the setting in admin >> settings.

Does that help?

CharlieHipHop’s picture

...that was the first thing I tried.

It's so frustrating because other modules (upload and audio) are using the path just fine. There's some quirk in the image module that only wants to use the top-level files directory in the main Drupal installation (it works on the main site and on another sub-site that's using the main site's path). It's driving me nuts. Surely I'm not the only one who's ever experienced this problem.

sepeck’s picture

Remove the leading /
my path is sites/example.com/files/images

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

CharlieHipHop’s picture

...I don't understand why the audio and upload modules use the path just fine but image seems to hate it.

bhagg’s picture

'm encountering the same problem and I get the message "The directory does not exist" even though I can see the directory on my server.

Looking for answers