LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-09-2002, 07:58 AM   #1
gene_gEnie
Member
 
Registered: Aug 2001
Location: London UK
Distribution: Redhat 7.2, soon to be LFS!
Posts: 42

Rep: Reputation: 15
png images not served by apache ..???


Hi,

I have a page that contains .png images. These display fine in Mozilla and Galeon when browsing the file locally. However when i try surf to the page, i.e. using the apache server on my box, the png's do not get displayed.

Do i have to add png support to httpd.conf ?

I would have thought that it was the browsers responsibility to deal with any 'stuff' that the server threw at it.

Anyone any ideas what i need to do to get me png's up n running? Cant see much about it on google.

Thanks

Martin
 
Old 05-09-2002, 08:27 AM   #2
gene_gEnie
Member
 
Registered: Aug 2001
Location: London UK
Distribution: Redhat 7.2, soon to be LFS!
Posts: 42

Original Poster
Rep: Reputation: 15
DOH!

wrong permissions



Martin
 
Old 05-10-2002, 08:11 AM   #3
Rashkae
Member
 
Registered: May 2002
Distribution: Slackware
Posts: 125

Rep: Reputation: 15
Apache and mime Types

Not that it has anything to do with your png problem, but in regard to your comment about web server handling everythign that you throw at it. In truth, Apache has to identify the file type and sent a header with the file that will tell the client what the file is supposed to be. (Image, Application, Text, HTML.. etc etc)... All known filetypes and header names should be in a mime.types file in your apache config. The kicker, however, is that http.conf defaults to type text for any unknown file types. Newer browsers that trust the header will try to open binary files right in the browser window if Apache does not recognize the filetype. (This is a bad thing.)... There is also a 'magic' module for Apache that tries to determine the filetype from its contents.

For my purposes, I find it much more useful to change the default in httpd.conf to application/octet. (The instructions are well placed in the coments). That way, browsers don't try to open unknown filetypes, but instead offer to dowload them or open with an application of my choice.
 
  


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
firefox and .png images. slackbat Slackware 9 12-02-2005 09:22 AM
Cannot open .png images. Nz_Boy_2004 Linux - Software 5 12-18-2004 10:23 PM
how to set descriptions for files served by Apache servnov Linux - Newbie 2 11-12-2004 07:35 AM
Apache: png file in CGI directory doza Linux - Software 2 08-27-2004 08:05 AM
Here are some more attractive Kweather png images devfreak Linux - Software 2 03-31-2004 09:58 PM


All times are GMT -5. The time now is 04:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration