Image loading problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Image loading problem

Postby Drachsi » 10. March 2020 07:09

I have a dev website running one pc, and can see the website when I access from a second pc on my home network. The only problem is, the images do not show on the second pc.

I checked the image by right clicking and see this message

Requested URL http://localhost:80/website/wp-content/ ... ed-faq.png
Physical Path C:\inetpub\wwwroot\website\wp-content\uploads\2020\02\red-faq.png

How can I correct the problem?

Regards
Drachsi
Drachsi
 
Posts: 38
Joined: 09. August 2010 07:18

Re: Image loading problem

Postby Altrea » 10. March 2020 08:24

localhost does only work from the very own pc the webserver is running on.
If you want to reference images, css files, js files, etc you need to use an url every client machine can use (e.g. the public network ip address).
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10325
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Image loading problem

Postby Drachsi » 10. March 2020 14:43

Hi,

Why does everything work, scripts, plugins etc, but not images on the 2nd pc?

Regards
Drachsi
Drachsi
 
Posts: 38
Joined: 09. August 2010 07:18

Re: Image loading problem

Postby Altrea » 10. March 2020 15:15

Because php code, plugins etc are processed by the server (server side programming language), asset files like CSS, JS, images are side requests fired by the clients browser.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10325
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Image loading problem

Postby Nobbie » 10. March 2020 17:27

Drachsi wrote:Why does everything work, scripts, plugins etc, but not images on the 2nd pc?


Because your images are NOT linked via a valid URL (like http://www.blabla.com/website/image.png), but instead you applied a pathname ( C:\inetpub\wwwroot\website\wp-content\uploads\2020\02\red-faq.png). And a pathname does not contain any domain name or servername, therefore the browser has no idea from which server to request the image, there is no request send to any server, the browser simply tries to open that pathname on the PC where the browser is running. And of course, on that client PC there is no such image, these are on the Xampp server.
Nobbie
 
Posts: 11657
Joined: 09. March 2008 13:04

Re: Image loading problem

Postby Drachsi » 11. March 2020 06:32

Ok,
Many thanks for the answer, solve some problems.

Regards
Drachsi
Drachsi
 
Posts: 38
Joined: 09. August 2010 07:18

Re: Image loading problem

Postby Altrea » 11. March 2020 06:35

Maybe you want to provide us information about what the real problem was and how you solved it!?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10325
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Image loading problem

Postby Drachsi » 11. March 2020 10:13

Hi,

The basic problem is the same, but as I thought it was I creating the no image showing, spent time in the wrong area.

Thanks for the support.

Regards
Drachsi
Drachsi
 
Posts: 38
Joined: 09. August 2010 07:18


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 73 guests