in reply to Re^2: Image doesnot display in perl cgi when moved code from linux to windows
in thread Image doesnot display in perl cgi when moved code from linux to windows

saurabh220837:

You're using "C:/Apache24/images/tree.jpeg" as the image source. I can guarantee you that that's not the URL that will access the file.

As people have mentioned to you, you'll need to check the apache configuration to find out how to tell it where the image is.

For example, if I set up a web server, I might configure it like this:

Alias /images C:/Apache24/images/ DocumentRoot D:/CoolWebsiteProject/html Alias /cgi-bin D:/CoolWebsiteProject/bin

So as far as the outside world is concerned "https://YourWebsite.com/images/tree.jpeg" would be the location that the outside world would use to access your image file. Similarly, "https://YourWebsite.com/cgi-bin/index.cgi" would be coming from D:/CoolwebsiteProject/bin. That's why you need to look at your configuration. Any time you're putting something like "C:/local/path/to/file" in an web page, you're doing it wrong.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re^3: Image doesnot display in perl cgi when moved code from linux to windows
  • Download Code