This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Webmaster forum > August 2006 > can't view images on some pages





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author can't view images on some pages
djaneb

2006-08-30, 6:54 am

Hello

Learning css and html - already got help from this group - thank you.
I've gradually been reworking and tidying up a site.

I can't see images on the pages called via a PHP code ... I can see the
images in the PHP page itself, but not the images that are in the
content part that is called.

If i insert one of the images somewhere in the PHP page itself i can
see it.

All I get is the red cross and the alt text for the image and the
placeholder - the path looks right so i thought maybe there is
something that i don't know about PHP and images when they get called
to another page - maybe related to the div container that it is in, but
i am not sure what to look for.

Here is the index.php - I've inserted the same image in the navbar on
the left at the bottom just to prove that the picture is there and
works ... I just made it smaller.

http://members.iinet.net.au/~dbensted/?page=home

I would appreciate any advice you can give me. I've tried a couple of
browsers. Let me know if you need any more info.

William Tasso

2006-08-30, 6:54 am

Fleeing from the madness of the http://groups.google.com jungle
djaneb <djaneb@XXXXXXXXXX> stumbled into news:alt.www.webmaster
and said:

> Hello


How do you do?

> ...
> I can't see images...
> http://members.iinet.net.au/~dbensted/?page=3Dhome


check the url of the image again

wrong: http://members.iinet.net.au/images/home.jpg

right: http://members.iinet.net.au/~dbensted/images/home.jpg

-- =

William Tasso

http://williamtasso.com/words/what-is-usenet.asp
Charles Sweeney

2006-08-30, 6:54 am

djaneb wrote

> Hello
>
> Learning css and html - already got help from this group - thank you.
> I've gradually been reworking and tidying up a site.
>
> I can't see images on the pages called via a PHP code ... I can see

the
> images in the PHP page itself, but not the images that are in the
> content part that is called.
>
> If i insert one of the images somewhere in the PHP page itself i can
> see it.
>
> All I get is the red cross and the alt text for the image and the
> placeholder - the path looks right so i thought maybe there is
> something that i don't know about PHP and images when they get called
> to another page - maybe related to the div container that it is in,

but
> i am not sure what to look for.
>
> Here is the index.php - I've inserted the same image in the navbar on
> the left at the bottom just to prove that the picture is there and
> works ... I just made it smaller.
>
> http://members.iinet.net.au/~dbensted/?page=home
>
> I would appreciate any advice you can give me. I've tried a couple of
> browsers. Let me know if you need any more info.


Why do you have two lots of:

<html>
<head><title></title></head>
<body>
</body>
</html>

Doesn't look right to me. Not sure if this has anything to do with your
problem.

If you call the page without CSS (comment out the CSS link) does the
picture appear?

--
Charles Sweeney
http://CharlesSweeney.com
Charles Sweeney

2006-08-30, 6:54 am

Charles Sweeney wrote

> djaneb wrote
>
> the
> but
>
> Why do you have two lots of:
>
> <html>
> <head><title></title></head>
> <body>
> </body>
> </html>
>
> Doesn't look right to me. Not sure if this has anything to do with

your
> problem.
>
> If you call the page without CSS (comment out the CSS link) does the
> picture appear?


Then I read Mr T's reply...doh!

--
Charles Sweeney
http://CharlesSweeney.com
David

2006-08-30, 6:54 am

Suggest setting permissions for each page, or all the pages within a folder
as writable. You can do this in most clients by right clicking on the file,
and choose chmod.

"djaneb" <djaneb@XXXXXXXXXX> wrote in message
news:1156928904.537426.65940@h48g2000cwc.googlegroups.com...
> Hello
>
> Learning css and html - already got help from this group - thank you.
> I've gradually been reworking and tidying up a site.
>
> I can't see images on the pages called via a PHP code ... I can see the
> images in the PHP page itself, but not the images that are in the
> content part that is called.
>
> If i insert one of the images somewhere in the PHP page itself i can
> see it.
>
> All I get is the red cross and the alt text for the image and the
> placeholder - the path looks right so i thought maybe there is
> something that i don't know about PHP and images when they get called
> to another page - maybe related to the div container that it is in, but
> i am not sure what to look for.
>
> Here is the index.php - I've inserted the same image in the navbar on
> the left at the bottom just to prove that the picture is there and
> works ... I just made it smaller.
>
> http://members.iinet.net.au/~dbensted/?page=home
>
> I would appreciate any advice you can give me. I've tried a couple of
> browsers. Let me know if you need any more info.
>



William Tasso

2006-08-30, 6:54 am

Fleeing from the madness of the Cox Communications jungle
David <dav2dd@XXXXXXXXXX> stumbled into news:alt.www.webmaster
and said:

[Top Posting[1] fixed to aid readability]

> "djaneb" <djaneb@XXXXXXXXXX> wrote in message
> news:1156928904.537426.65940@h48g2000cwc.googlegroups.com...
[color=darkred]
[color=darkred]
> Suggest setting permissions for each page, or all the pages within a =


> folder
> as writable.


What on earth for? This is a 'read' issue. Regardless of the =

availability of .htaccess processing on some web servers, it is always a=
=

security risk to open a directory to write access by the web server unle=
ss =

that directory is off the www root.

> You can do this in most clients by right clicking on the file,


What are you talking about? Which client? FTP?

> and choose chmod.


Assumes server o/s is *n*x - which it may be, but is irrelevant here.

Look - I know you're trying to assist - and this is laudable - but pleas=
e =

consider how your recommendations may be received by others with less =

experience reading your post in days/weeks/months to come.

Sorry if the above comes across as grumpy - but I think the point is wor=
th =

making.

[1] Look it up in your favourite s/e
-- =

William Tasso

http://williamtasso.com/words/what-is-usenet.asp
Andy Dingley

2006-08-30, 6:54 am


djaneb wrote:

> I can't see images on the pages called via a PHP code


> http://members.iinet.net.au/~dbensted/?page=home


Replace "/images/home.jpg" with "images/home.jpg"

The problem is because you're on cheap hosting with a shared host and a
user directory rather than a user-specific subdomain name, or indeed
your own domain name. As a result you can't easily use URLs beginning
with "/" as they're pointing at the server's root, not the user's root

If you want to have a larger site with subdirectories in it, then you
could also use a URL of "/~dbensted/images/home.jpg", which will work
from any subdirectory. But if you get that far, then it's probably time
to find some better hosting option.

djaneb

2006-08-30, 6:43 pm


William Tasso wrote:
> Fleeing from the madness of the http://groups.google.com jungle
> djaneb <djaneb@XXXXXXXXXX> stumbled into news:alt.www.webmaster
> and said:


>
> check the url of the image again
>
> wrong: http://members.iinet.net.au/images/home.jpg
>
> right: http://members.iinet.net.au/~dbensted/images/home.jpg


OK - I can see what you are saying. I have another question, then. Why
does the image that I have on the index.php page have the address with
the ~dbensted but the image from the home.html page doesn't have the
~dbensted when both have the same path format in the code ...

this is the code for the small image under the left nav which is in the
root folder on page index.php

<img src="images/home.jpg">

this is the code for the larger image which is on content\home.html and
is included via php

<img alt="All Saints' Anglican Church Balgowlah"
src="/images/home.jpg">

It must be the way the server itself is doing something - because if I
add the ~dbensted to the file path it doesn't work either, it comes out
with double ~dbensted.

Well, I hope this isn't too confusing a question. The actual website
itself is on another server, and I am just using my own personal
website of my isp to rewrite it and learn the language, so maybe my isp
doesn't have great support for PHP or something like that. What do you
think?

Many thanks

Deb

djaneb

2006-08-30, 6:43 pm


Andy Dingley wrote:
> djaneb wrote:
>
>
>
> Replace "/images/home.jpg" with "images/home.jpg"
>
> The problem is because you're on cheap hosting with a shared host and a
> user directory rather than a user-specific subdomain name, or indeed
> your own domain name.


OK - thanks - that explains it - and answers the question I posed in
another reply before I saw your reply.

Indeed you are right - as I said in the other reply. I am just using my
personal webspace to learn coding and rewrite the site which is hosted
somewhere else and is (apparently) a bit of a coding mess.

Thanks so much for this

Deb

djaneb

2006-08-30, 6:43 pm


djaneb wrote:
> William Tasso wrote:
>
> It must be the way the server itself is doing something - because if I
> add the ~dbensted to the file path it doesn't work either, it comes out
> with double ~dbensted.
>
> Well, I hope this isn't too confusing a question. The actual website
> itself is on another server, and I am just using my own personal
> website of my isp to rewrite it and learn the language, so maybe my isp
> doesn't have great support for PHP or something like that. What do you
> think?



No need to answer this as another poster confirmed that the problem is
related to the fact that it is personal webspace with a shared host.
The problem is fixed removing the first slash and I can't change them
all back when I move over to the proper host when it is finished.

Thank you so much for your time and patience.

Deb

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews