Thank you so much for your responses.  Thanks for any response!

I now the GD libraries with PNG support.  However, the image is still
broken.  I looked at the apache server error log and this is what showed up
when I run zero.php(See below): 

libpng warning: Application was compiled with png.h from libpng-1.0.8
libpng warning: Application  is  running with png.c from libpng-1.2.1
gd-png:  fatal libpng error: Incompatible libpng version in application and
library
[Tue Mar 12 20:09:43 2002] [notice] child pid 30296 exit signal Segmentation
fault (11)


------------
Action Taken
------------
o Deleted old lipng* files in /usr/lib 
o Compiled libpng-1.2.1 and installed it in: /usr/lib 
o recompiled and installed php 4.1.2(Upgraded from 4.1.1)

--------------------------
CODE
--------------------------

zero.php
--------
<img src="one.php" alt="a PHP generated image">

one.php
-------
<?php
header("Content-type: image/png");
$image = imagecreate( 200, 200 );
imagepng($image);
?>



-----Original Message-----
From: Alastair Battrick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 12, 2002 7:05 AM
To: Jordan S. Jones; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Can't display PNG images


Echoing text to the screen is a very useful debugging tool when creating
images from php, if you type the full location of the image script in the
address bar, rather than specifying it as an image that is opened by a html
page.

If you do this Teresa, you should get the PHP error message, and if you give
this to us it would help.

Alastair Battrick
Senior Developer
Lightwood Consultancy Ltd
http://www.lightwood.net

> -----Original Message-----
> From: Jordan S. Jones [mailto:[EMAIL PROTECTED]]
> Sent: 12 March 2002 11:29
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: Can't display PNG images
>
>
> The icon essentially means that it was a broken image, or that
> they code did
> not work.  I know that wasn't much help.
>
> On another point, in my opinion, it doesn't make a whole lot of logical
> sense to have a die("Error text") statement in code that creates
> an image..
> If an error does occur, it will still display the same broken image icon.
> However, I am not the definitive word on the matter, and if you or anyone
> else has a different opinion on the matter, I would be more than happy to
> hear it.
>
> Jordan
>
> "Teresa Narvaez" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello,
> > Background info:
> > ----------------
> > I'm running
> >     o PHP 4.1.1 on a linux server kernel(2.2.16).
> >     o Using Netscape Communicator 4.75
> >     o Compiled and installed the gd(1.8.4) library
> >
> > Problem(2 problems):
> > --------------------
> > 1.- The following code won't display an image(I get an icon of some type
> of
> > piece of paper).
> > <?php
> >    header ("Content-type: image/png");
> >    $im = @ImageCreate (50, 100)
> >       or die ("Cannot Initialize new GD image stream");
> >    $background_color = ImageColorAllocate ($im, 255, 255, 255);
> >    $text_color = ImageColorAllocate ($im, 233, 14, 91);
> >    ImageString ($im, 1, 5, 5,  "A Simple Text String", $text_color);
> >    ImagePng ($im);
> > ?>
> >
> > 2.- The configure Command from phpinfo() is different than what
> I actually
> > typed at the
> >     command line.  Also, phpinfo() area for GD does not show PNG or JPEG
> > support.  why?
> >        from phpinfo()
> >        --------------
> >          './configure' '--with-mysql' '--with-apxs=/var/apache/bin/apxs'
> >          '--with-gd=/home/builder/downloads/untarred/gd-1.8.4'
> > '--enable-sockets'
> >          '--enable-calendar' '--enable-ftp' '--enable-trans-sid'
> >        What I typed at the command line:
> >        ---------------------------------
> >          ./configure --with-mysql --with-apxs=/var/apache/bin/apxs
> >           --with-gd=/home/builder/downloads/untarred/gd-1.8.4
> >           --with-png-dir=/usr/lib --enable-gd-native-ttf --with-ttf
> >           --with-jpeg-dir=/home/builder/downloads/untarred/jpeg-6b
> >           --with-t1lib=/home/builder/downloads/untarred/t1lib-1.3.1
> >           --enable-sockets --with-zlib-dir --with-xpm-dir
> --enable-calenda
> r
> >           --enable-ftp --enable-trans-sid
> >
> > OUTPUT from phpinfo()
> > -----------------------
> > GD Support            enabled
> > GD Version            1.6.2 or higher
> > WBMP Support          enabled
> >
> > I would really appretiate any ideas you could give me.
> > Thanks in advance! -Teresa
> >
> >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to