• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Images not visible using a local server with XAMPP

Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

HI

I've resurrected an old project which worked in the past.  Since then, Ive upgraded both Windows (8.1) and Dreamweaver (CC)  Today I installed the latest XAMPP and created a folder called xamp2015.  I copied the old project (MySite) to the HTDOCS folder

Now, the site logic is working, BUT, the images are not appearing.

They are stored here C:\xampp2015\htdocs\MySite\Images\Main

My Local Site folder is C:\xampp2015\htdocs\Mysite

Default Images folder is C:\xampp2015\htdocs\MySite\Images\

The images will appear if I move them to c:\xampp2015\htdocs\MySite and update the links, but this would lead to a messy structure, which was not needed previously

Does anyone have any suggestions?

TOPICS
Product issue

Views

34.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 19, 2015 Feb 19, 2015

Try creating a new sub folder called "bob" and put an image in it, link to it on one of your pages and see if it comes up.

Also, what's that .htaccess file up to in your Images folder?

Votes

Translate

Translate
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Could we see the code of one of the pages?

I'm thinking you might have a case structure issue where your folder on your test server is called Images (capital I) and the links are pointing to images (lowercase).

It's best to stick with all lowercase names for that reason. It's easy to goof it up and servers treat Images and images or Picture.jpg and picture.jpg as separate individual locations/files.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Hi

Thanks for your message.  I'm confident with folder names as they havn't been changed since it worked,, but I doubled checked after your reply

Heres the code for one image and how it looks in Live view

<div class="header"><a href="#"><img src="Images/Main/MySite Logo.gif" alt="Insert Logo Here" name="Insert_logo" width="720" height="100" id="Insert_logo" style="display: block; margin: auto;" /></a><!-- end .slideshow -->

  </div>

Grabs of the files panel show;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Also, every image which is in a sub folder is affected

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Is that page you pulled the code from in the site's root folder?

I know it's a bit of "is it plugged in", but the server is running, right?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Hi

Yes, in the root folder

And yes, the servers running    (Im using port 8080 for apache) as you can see the name for the image is there, rather than the image itself

The logic is working correctly, only the images are not.  And, if I 'move' the images up the folder structure, they appear on the server page (as opposed to in DW)

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Your alt text is showing instead of the image, which is the right thing for it to do when the image is unavailable for whatever reason.

Does the browser throw any kind of error when you browse to the absolute path of the image?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

HI

I can go to the images via the browser with no messages of any type

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Have you published your site to the Testing Server yet?

I normally assign my local site folder to the testing server's so Save automatically puts files on the testing server.

C:\xamp2015\htdocs\SiteName

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Hi

Thanks for your reply

Yes, I have set mine as per your example (please see initial post)  The site is behaving correctly on the testing server except for displaying images.  (It will display them correctly if I remove them from the subfolders eg Sitename/Images/Main/Image.jpg to the following Sitename/Image.jpg)

The file structure I am using worked fine previously before the upgrades etc I mention in my initial post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Are you using document relative or site root relative links?

As an FYI, Root Relative links will work on the remote server but they won't work on local testing server because they drill all the way down to your local hard drive past the site's root folder.

I think somebody once said (Murray?) that it will work if you preview with TEMP files turned on.

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Hi

Document relative (again, not changed when reloading this project)

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Which browser?

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

I have also now realised that hyperlinks from the images don't work, but links from toolbars do, if that tells you anything

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

This is probably my last stab at it...

What happens when you right click the image in Firefox and choose View Image while the page is pulled up under localhost?

(You'll probably have to right click on the alt text to get the option.)

If it comes up correctly, it would sound to me like a cache problem with your browser.

If it doesn't come up, you should see some kind of message from Apache that could help point us in the right direction

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

If I check image info, I get http://localhost:8080/Sitename/Images/Main/Logo.gif

I can have a look at the cache certainly

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Nope, sorry not the Image Info command, it needs to be View Image command or you won't get any reasoning from the server if the server is blocking access.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

HI

No error messages, but not opening the image either

Thanks for the ideas anyway

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Hmm, Just tried a virgin browser (Sleipnir) which has never been used for local server interaction, the images are not visible in that either so not likely to be a cache issue I think

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Looking again at your code posted earlier I'm seeing a space between MySite and Logo.  On Linux that needs to be renamed without any spaces or you must add the html entity for spaces which is %20.

<img src="Images/Main/MySite Logo.gif">

<img src="Images/Main/MySiteLogo.gif">

<img src="Images/Main/MySite%20Logo.gif">

Then further down, you post this which is completely different.

http://localhost:8080/Sitename/Images/Main/Logo.gif

Check your code again to ensure you're using the correct file names and paths.

Nancy O.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Hi

Sorry, I used the term 'sitename' to tie up with a comment from another poster, it is MySite in this example

The code should have read as below, typo on my part (Ive just checked it again to make sure, there are no spaces)

<div class="header"><a href="#"><img src="Images/Main/Logo.gif" alt="Insert Logo Here" name="Insert_logo" width="720" height="100" id="Insert_logo" style="display: block; margin: auto;" /></a><!-- end .slideshow -->

  </div>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

Do .html files in sub-folders fail the same way as images are?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

html and php pages have always been at the 'top' level, not in sub folders, likewise .swf files. But, everything else on the project seems to be working correctly.  CSS files and templates are in sub folders, and these are working fine

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

How were the folders copied and from where (external drive, CD, etc)?

Could there be a Windows permissions issue on the copied folders?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 19, 2015 Feb 19, 2015

Copy link to clipboard

Copied

A straight copy from the old xamp/htdocs folder to the new xamp2015/htdocs one (you may recall, I can access straight from the browser)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines