logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Can't view images on page Page 1, 2  Next
Author
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 1:41    Post subject: Can't view images on page Reply with quote

Let me start a new thread with this issue please, I don't think this is an Apache issue but I'd like to ask for help anyway, I am having problems viewing any images on the browser and don't know why so I am starting from scratch. See the code below, I have placed an image titled "jesus.jpg" into a folder named "church" on my C drive, the relative path is

C:/mike'sdocs/websites/church

just to be sure I checked the image's properties and it confirms the image is a jpg file, I copied this image into Apache's htdocs folder where I placed the index file and this is all I am getting, the pic itself does not show, all I am seeing where the image should be is a rectangular bordered box on a transparent background with a small icon of a dog-eared page with 3 colored tiny symbols in it, what could be wrong here please?


[/img]
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 06 Feb '09 2:07    Post subject: Reply with quote

Have you tried viewing JUST the image in the browser?

like
File -> open -> browse to and select jesus.jpg

possibly corrupt image?
try a different image?
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 2:10    Post subject: Reply with quote

I didn't try that before but I did now at your suggestion and it shows the image fine with the method

File -> open -> browse to and select jesus.jpg

so what could possibly be the problem?
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 06 Feb '09 2:53    Post subject: Reply with quote

Not sure what the problem is looking at your html from the other post.
The stuff below in red should go into the css file or inside <style> tags. This should not effect whether or not you see the image but I've seen stranger things.

<html>

<head>
<link rel="stylesheet" type="text/css" href="page.css">
</head>

<body bgcolor="white" text="blue">

<h1> This is My first page </h1>

This is my first web page and I can say anything I want in here - I do that by putting text

or images in the body section - where I'm typing right now Smile

<img src="jesus.jpg" width="150" height="150" alt="Image of Jesus">

span {
font-variant:small-caps;
}


</body>

</html>
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 3:23    Post subject: Reply with quote

I tried it with your code, same problem, I tired it with a simple html code and same problem:

<html>
<body>

<h1>My First Heading</h1>

<p>My first paragraph.</p>


<img src="jesus.jpg" width="144" height="50" />

</body>
</html>
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 06 Feb '09 11:42    Post subject: Reply with quote

Hi Mike,
where did you place the image? is it in the same folder?

What is in your error.log about that?

Mario
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 14:21    Post subject: Reply with quote

yes, the image is in the the htdocs folder too with the index file. I don't see anything in the error log pertaining to the image problem?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 06 Feb '09 15:17    Post subject: Reply with quote

You should watching for 404 errors. Or search in the access.log if the jesus.jpg is accessed or not. tried a different browser? Tried to open the file over the filesystem and not over the http://localhost ?
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 15:28    Post subject: Reply with quote

I'm using FF, Just tried it in IE, does not work there either. Yes, as mentioned before the image shows fine when using the File->Open method. I don't know how to understand the error log items, can you or anyone help please? Here is the "access" log you mentioned:

Code:

127.0.0.1 - - [05/Feb/2009:11:16:13 -0500] "GET /jesus.jpg HTTP/1.1" 404 281
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 15:30    Post subject: Reply with quote

And here is an "error" doc found in the Logs folder:

Code:

[Thu Feb 05 11:15:17 2009] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/jesus.jpg, referer: http://localhost/
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 06 Feb '09 15:43    Post subject: Reply with quote

I shorted the logs a bit Wink

As you can see the file is missing in the htdocs folder.
Code:

File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/jesus.jpg
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 16:10    Post subject: Reply with quote

Don't understand what "file" is missing? The "jesus.jpg" image is in the htdoc folder? Please bear with with me, when you teach me this now, I will have no problem with the same issues in the future.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 06 Feb '09 20:18    Post subject: Reply with quote

Apache is issuing a 404 so file not found.
Are you sure you put it into the htdocs folder? double check
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Fri 06 Feb '09 20:25    Post subject: Reply with quote

yep, the jpeg file jesus.jpg is in the htdocs folder, i just clicked on the file to make sure it opens and it does.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Sat 07 Feb '09 20:09    Post subject: Reply with quote

Just curious if other images are working.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Sat 07 Feb '09 23:39    Post subject: Reply with quote

My last two cents.
Does your explorer show all file extensions?
If not --> Browse the htdocs folder with the command line (cmd) and watch for the file name! Is it the real one?

Second idea right click on the file for renaming and copy the file name and paste it into the html.
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Tue 10 Feb '09 14:14    Post subject: Reply with quote

Same deal with other images.

no, the index file in the htdocs folder does not show the .html extension but in the cmd it does show the correct file and extension.

renaming and copying the file name and pasting it into the html does not help
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 10 Feb '09 18:19    Post subject: Reply with quote

Which does do you see for the jesus image from the commandline?

Maybe you can turn off hiding known file extensions.

http://www.tacktech.com/display.cfm?ttid=193

I think that will bring some light into it.
Back to top
mikehende



Joined: 05 Feb 2009
Posts: 16
Location: NYC

PostPosted: Tue 10 Feb '09 18:59    Post subject: Reply with quote

actually from the cmd line, it lists the image file as jesus.jpg.jpg, when I first downloaded the couple images into the church folder, I guess because windows was not to show the extensions and since I wasn't seeing it, that's why I added the .jpg hence the reason why the file now shows 2 .jpg extensions. Ok, I renamed the file in the church folder to jesus.jpg so that should be correct now and did the same to the file in the htdocs folder and it works now!

You guys have been great and extremely patient, this has certainly been a trying experience and I have learned much from it, THANK YOU VERY MUCH James Blond and the rest of you guys and please accept my apologies for having put you all through this ordeal when it was my fault, see you all in the forums, Mike
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 10 Feb '09 21:51    Post subject: Reply with quote

You are welcome Very Happy
Back to top


Reply to topic   Topic: Can't view images on page View previous topic :: View next topic
Post new topic   Forum Index -> Apache Page 1, 2  Next