Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-06-2008, 09:23 PM   #1
Senior Member
Registered: Feb 2003
Location: Washington D.C
Posts: 2,187

Rep: Reputation: 60
Web Page Problem Displaying Image

I have a web page that displays fine except for the image in the middle of the page. I have tried to set the permission to the file to 777 and I still cannot see the image on the web page. I am assuming that the directory has the proper permission since the web page is in the same directory.

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">^M
<title>DansGuardian Access Denied</title>^M
<body bgcolor="#ffffff">^M
<table border="0" cellpadding="2" cellspacing="0" height="540" width="700">^M
<tr style="color: rgb(255, 255, 255);">^M

<td style="background-color: rgb(51, 51, 255);" colspan="2" align="center" bgcolor="#fea700" height="100">^M
<font face="arial,helvetica" size="6">^M
<b>I have my eye on you!, that is Dartanion and Zithirus</b>^M
<td style="background-color: rgb(255, 255, 204);" align="center" bgcolor="#ffffff" valign="center" width="550">^M
<font color="black" face="arial,helvetica">^M
<font size="4"><br>^M
<font size="3"><font color="red"><b><img style="width: 320px; height: 274px;" alt="" src="file:///etc/dansguardian/languages/ukenglish/Ugly_Baby.jpg"></b><br>
a href="-URL-" target="_blank">-URL-</a>^M
Gotta Cha
Trying To Be Naughty Doesnt Pay Off In The End!<br style="font-weight: bold;">^M
<span style="font-weight: bold;"></span></big></big></big><br>^M
Love Senior Administrator of the House
<font size="1"><a href="" target="_blank"><br>^M
The available variables are as follows:
URLgives the URL the user was trying to get to.
REASONGIVENgives the nice reason (i.enot quoting the banned phrase).
REASONLOGGEDgives the reason that gets logged including full details.
USERgives the username if known.
IPgives the originating IP.

You need to remove the space between the - and the variable to use them
in your HTML
.  They are there above so extra processing is not required.

More example templates are likely to be found on the DansGuardian web site
on the Extras page

Last edited by metallica1973; 10-07-2008 at 12:07 AM.
Old 10-06-2008, 09:42 PM   #2
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
You should look at your web logs for more information. Not sure which distro, but I assume /var/log/httpd or something close.

I think that 'file:///' is an absolute path from the client side. If you want to serve from a server, you should be using relative paths server side for example something like: ../../../etc/image.jpg

Correct me if I'm wrong, but isn't it bad practice to serve any web http content from directories such as '/etc'?
Why not just copy the image to a web accessible directory?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image file get smaller in web page via Squid Proxy Linux - Software 0 03-02-2007 04:46 AM
Displaying web images as background image on desktop Jarkandu Fedora 1 01-18-2007 05:49 AM
simple script to grab an image from a web page and set background stardotstar Programming 43 09-11-2006 11:52 PM
apache web page authentication problem jitheshmurali Linux - General 3 04-01-2006 03:51 PM
strange web page problem dsiguy Linux - General 3 02-19-2003 02:03 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration