From owner-freebsd-questions@FreeBSD.ORG Fri Feb 16 13:12:16 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1949B16A402 for ; Fri, 16 Feb 2007 13:12:16 +0000 (UTC) (envelope-from cptsalek@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.freebsd.org (Postfix) with ESMTP id CF2DB13C491 for ; Fri, 16 Feb 2007 13:12:15 +0000 (UTC) (envelope-from cptsalek@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1114426wxc for ; Fri, 16 Feb 2007 05:12:15 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=m80SJ1KYi1UfdGuDRAcCKogk3OL8sD4LHBevqiXJAV+vxQsmmXCOfZ6LGplAyrLzIMhXmplEBJJdqv4z4sRmLwVN7Ir1eQNJLOeamIZfJAHGYlyhCZDX+xtGVH9CYOv0tQuqjWe7EOmO0oaLSf9uv3ztLWjDGCVzKW9jnEoYpto= Received: by 10.70.90.17 with SMTP id n17mr5352078wxb.1171631535026; Fri, 16 Feb 2007 05:12:15 -0800 (PST) Received: by 10.70.39.18 with HTTP; Fri, 16 Feb 2007 05:12:14 -0800 (PST) Message-ID: <14989d6e0702160512l1f8a18cbp3fd60120ae98026c@mail.gmail.com> Date: Fri, 16 Feb 2007 14:12:14 +0100 From: "Christian Walther" To: "Roger Olofsson" In-Reply-To: <45D59DB1.3000802@passagen.se> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45D59DB1.3000802@passagen.se> Cc: freebsd-questions@freebsd.org Subject: Re: How to display .png? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Feb 2007 13:12:16 -0000 On 16/02/07, Roger Olofsson 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 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