I am using xampp to run a test version of my site on localhost. Here is what I have done so far:

1) installed xampp (works fine).
2) created database "drupal"
3) used phpmyadmin to import database
4) uploaded drupal files from backup to g:/xampplite/htdocs/drupal/
5) changed my settings.php

Site seems to work fine EXCEPT all theme related images are not showing in the site.

It is a custom theme...I wonder if there is a PATH problem somewhere in my theme. I see something like this in my .css file (../../)

Could this be the problem?

Comments

ThatSteveGuy’s picture

I believe those will work differently. I think that with css background images, you don't need to specify anything but the image name. With img tags in the tpl files, I *believe* you will need to specify it like "/[drupal_root]/sites/all/themes/[theme_name]/img.jpg".

I'm fairly new to Drupal myself, and am also running locally on a Windows machine (used Web Platform Installer). I've been subthemeing Zen, and the above is how I setup my paths. Perhaps someone with more experience here can give you a better answer.

snsace’s picture

My theme page.tpl uses direct path to it's own images folder. The path to my theme images is "/sites/all/themes/dpl360/images/"

Can't figure out why theme images will not appear. Drup images like (forum icons, and user pictures) do appear. It's just my theme images
and header image.

anawillem’s picture

i have multiple localhost drupal iinstallations, and this is happening (images not showing up) on a couple of them. The linking characteristic is that they have their url('../images/'). I have another site with a similar Zen theme as one of them that is showing up perfectly, so I think it is not directly related to the theme specifically and more related to .htaccess or similar configuration files...

--
anawillem
http://jellobrain.com

dquark3’s picture

Eureka. Through divine inspiration I figured out the solution for this was on the sites I had.

Running D7 on a current Apache/cPanel/WHM server. Had two similar sites developed on XAMPP. One showed images fine, the other did not, although the paths and directory permissions were correct. Turns out the Image module, which wasn't needed, was causing the trouble. Disabling it fix everything.

dquark3’s picture

I swear--disabling the image module did fix it for part of a day, then it went back. Strange. Turns out I did discover what was causing the image problem: HotLink Protection.

My cPanel (Security >> HotLink Protection) option was not activated, yet I believe the WHM server was set up with the option enabled. Since my site was not added as an exception it was not allowing images to be shown. I straightened the server out by enabling then disabling the option. To further validate, I reenabled it, added my site as an exception, and it now works great.