Please help - Links to images not appearing to annonymous users.
I have links to images in both blocks and content nodes, which appear fine when I'm logged in as an administrator, but when I log out to view as an annonymous user, the pictures disappear. The file is in the following directory on the server:
[domain name]/drupal/files/ContactUs_01.gif
The code I've tried is similar to the following examples: (brackets removed for postability)
- 'img src="/drupal/system/files/ContactUs_01.gif" /'
- 'img src="/drupal/files/ContactUs_01.gif" /'
- 'img src="/files/ContactUs_01.gif" /'
Oddly, the only one that seems to work is the one with "system" in the URL, although I have no such directory on the server. Even so, when I log out, the image becomes invisible.
I have verified that the files are public, (I switched to private to trouble-shoot, then back to public.) as well as a half-dozen other fruitless endeavors. (Using Image module and referencing a specific node, and/or URL alias hasn't worked either.) Has anyone ever seen this? If so, how do I solve it?
Thanks,
hoopdloop
P.S. This is currently on the following platform: Drupal 5.12, Apache 1.3.3, PHP 5.0.5, MySQL 4.1.22,

There could be any number of
There could be any number of things happening here. Having the install in a subdirectory may mean you need to set the $base_url variable in settings.php, there may be problems with the permissions table, also check that the drupal file settings are correct.
Passing Phase Web Development
Thank you for the
Thank you for the suggestions.
The file system at /drupal/admin/settings/file-system is set to "public".
The user permissions at: /drupal/admin/user/access have also been double-checked, and are enabled for anonymous users to view pictures.
Is there another place I should be checking the file settings and user permissions?
The site is actually installed in the root drupal directory. As mentioned above, the "system" directory appears in the URL of image uploads, but doesn't actually exist on the server (Is somehow added by Drupal. Does anyone know why?) the base URL is also configured correctly.
example: $base_url = Mysql://[myUsername]:[myPassword]@[myDBhost.myDomain.com]:[port#]/myDatabaseName';
Everything except images are working properly, and as mentioned above, the images actually show up fine when I'm signed-in. For some reason, Drupal is preventing the images from displaying to anonymous users only. I've scoured the entire application for user and file settings but have run-up against a brick wall. Any other thoughts?
thanks in advance.
base_url should be something
base_url should be something like this:
$base_url = 'http://www.example.com';
You have given the $db_url value. However, in your case some directory problems can be solved by setting the base_url as follows:
$base_url = 'http://www.example.com/drupal';
Because your Drupal files are in a subdirectory of your root directory called 'drupal'. If there is no need for them to be there you might have more joy if you moved them all to the root directory, but then of course you would have to configure everything. So instead setting the base_url as above should solve that anyway.
Some image modules create directories for the images. Check your image configuration settings.
Passing Phase Web Development
Found a workaround
I ended up creating an images folder at "/drupal/images" which was independent of the "files" directory, and it now seems to be working perfectly. However, I would still be interested if anyone can explain what was happening, and how to avoid it in the future. (And why was I seeing a "/system/" directory in the URL of uploaded pictures, when such a directory doesn't exist on my server?) This solution I've found is less than optimal because it becomes one more folder I have to re-copy after each upgrade, but it should work for now.
Thanks,
hoopdloop