How to display .png?

Roger Olofsson raggen at passagen.se
Fri Feb 16 14:27:53 UTC 2007



Roger Olofsson skrev:
> Christian Walther skrev:
>> On 16/02/07, Roger Olofsson <raggen at passagen.se> wrote:
>>> Dear Mailing List,
>>>
>>> As usual, thanks alot for all answers to my previous questions! I will
>>> try and step up and answer the ones I can.
>>>
>>> I'm still fiddling around with a machine that's upgraded to 6.2 and have
>>> encountered a small thing. Apache refuses to display .png pictures. This
>>> is probably some setting somewhere and I have looked in the following:
>>>
>>> httpd.conf of course
>>> php.ini
>>>
>>> I have reinstalled and checked options for php5, I have checked options
>>> and reinstalled gd and I have compared httpd.conf and php.ini with a
>>> FreeBSD 5.5, I have run phpinfo on both machines and compared the
>>> results, they look very much alike. The 5.5 displays .pngs fine though.
>>>
>>> I have also checked file permissions for the pictures, they all look
>>> fine. The output of httpd-error.log has no pointers.
>>>
>>> What could be the magic trick? Probably something really simple?
>>>
>>
>> Apache doesn't display images, it just serves them. That is to say
>> they are downloaded to the browser like any other file is, and the
>> browser displays them.
>> So, what configuration are you using? From what you've given so far
>> you obviously have to different machines.
>> What about the ./htdocs tree, is it the same on both machines, e.g.
>> did you copy it from the 5.5 machine to the new one? Where is the
>> browser running? Is it running locally on the 6.2 machine, or do you
>> have a third machine from which you access both servers?
>> How do you access the png-Images? Are they embedded in a web page,
>> e.g.  by a <img src="" alt="" /> tag, or do you follow a link?
>>
>> How does it look like in your web browser? Is the image missing
>> entirely, or do you have a "broken image" icon where you expect the
>> image to be? If there is such an icon, what are its properties? (If
>> you're using firefox you can right click on the image icon and select
>> properties.)
>> If there is no icon, does anything strange happen, e.g. does your
>> browser display weird lines of text, or does it open a save as-dialog?
>>
>> What I think is possible is that there is a difference in the
>> mime-type definition of both servers. If a file is requested from a
>> web server the server sends a header that hopefully contains the right
>> mime type. Depending on the mime-type the browser decides what it can
>> do with it. So if there is no definition for png on your server, it
>> might either be sent as a text- or binary file, resulting in strange
>> behaviour in your web browser.
>>
>> HTH
>> Christian
>> _______________________________________________
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to 
>> "freebsd-questions-unsubscribe at freebsd.org"
>>
>>
> Hello, and thank you for your reply,
> 
> It appears as if this is an application thing. I put the old version of 
> b2evolution there and that one displays the .pngs fine, the new one 
> (0.9.2) does not. Thanks for your input!
> 
> Greetings
> /Roger
> 
Hello, and thank you for your reply,

It appears as if this is an application thing. I put the old version of 
b2evolution there and that one displays the .pngs fine, the new one 
(0.9.2) does not. Thanks for your input!

Greetings
/Roger


More information about the freebsd-questions mailing list