I've got drupal 6.19 installeded locally in an xampp SUBDIRECTORY. Everything works great with the exception of the images are broken. They path being created is missing my subdirectory where drupal is installed.

The path should start with :

http://localhost/drupal6.19/sites/default/files/

but is instead
http://localhost/sites/default/files.

I've tried:

setting base url in the setting php file and clearing my cache:

$base_url = 'http://localhost/drupal6.19';

did not work.

I've tried :

uncommenting this line int he htaccess file and clearing cache:

# RewriteBase /drupal6.19

nothing.

I'm running out of ideas. Any help?

i won't do a clean install as I've already spent a lot of time migrating content over and configuring the site. I need to get this fixed somehow...

Comments

holiday76’s picture

No one seems to want to touch this problem for some reason, though I've seen many other posts with similar problems and no clear solution.

I've installed the pathologic module in an attempt to rewrite the paths to add in my subdirectory, and i'm still having the same problem - All images are missing the subdirectory that my drupal install is in ,in the src.

I can't believe there doesnt seem to be an easy answer to this problem.

*sigh

sreyas’s picture

This never occurred to me, I have three different XAMPP installation and have 100s of drupal running on these XAMPPs.

Have you changed any apache settings directly editing the config file?

Have you verified the file system path is set correctly at /admin/settings/file-system

------------------
Ciril Sreedhar
Sreyas IT Solutions
Server Administration | Web Designing | Web Programming

Anonymous’s picture

I have a similar problem.

The vie interface uploaded images work fine. However, manual links go nowhere: '/sites/default/files/...' point to the 'c:/xampp/htdocs/sites/default/files/...' directory, not the 'c:/xampp/htdocs/MYDRUPAL/sites/default/files/...'.

What to do?

dzah’s picture

I see that this is quite an old thread, but it seems that I still can't find an answer.

I have exactly the same problem:
My site files are in xampp/htdocs/mysitename and the site is accessible under http://localhost/mysitename.
However, Images are not visible.
The path to images on webpages is
http://localhost/sites/default/files,
while
http://localhost/mysitename/sites/default/files/
is obviously what is needed here.

Has anybody found a solution?

Drupalima’s picture

It is the path in configuration -> media -> file system that you have to change.