LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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
<html>^M
<head>^M
^M
  
<title>DansGuardian Access Denied</title>^M
</head>^M
^M
^M
<body bgcolor="#ffffff">^M
^M
^M
<center>^M
<table border="0" cellpadding="2" cellspacing="0" height="540" width="700">^M
^M
  
<tbody>^M
    
<tr style="color: rgb(255, 255, 255);">^M

^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
        
</font></td>^M
^M
    
</tr>^M
^M
^M
    
<tr>^M
^M
        
^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
^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
        
<br>^M
      
<big><big><big><br>^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
<br>^M
      
<br>^M
      
<br>^M
      
<br>^M
^M
        
<font size="1"><a href="http://www.dansguardian.org" target="_blank"><br>^M
      
</a>^M
        
</font></font></font></font></font></font></td>^M
^M
    
</tr>^M
^M
  
</tbody>^M
</table>^M
^M
^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
.
-->^
M
</center>^M
</body>^M
</html>^

Last edited by metallica1973; 10-06-2008 at 11:07 PM.
 
Old 10-06-2008, 08:42 PM   #2
mjmwired
Member
 
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?
 
  


Reply


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 matthey@gich.com.hk Linux - Software 0 03-02-2007 03:46 AM
Displaying web images as background image on desktop Jarkandu Fedora 1 01-18-2007 04:49 AM
simple script to grab an image from a web page and set background stardotstar Programming 43 09-11-2006 10:52 PM
apache web page authentication problem jitheshmurali Linux - General 3 04-01-2006 02:51 PM
strange web page problem dsiguy Linux - General 3 02-19-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:52 AM.

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