Re: dynamic PNG image generation

[email protected] ("Claus Bloch") Sun, 16 Sep 2001 18:08:42 +0200
Newsgroups php.lang
Message-ID <[email protected]>
Hi

it is not esy to see the problem if all the lines is not showen. but it can
bee becurse that it is in a HTML file. You have to use '.php' or perhaps
'.phtml'. You have too tell the php that you are using it.


claus
"Rjae" <[email protected]> skrev i en meddelelse
news:[email protected]...
> hi
>
> I am using PHP4.0.4 to dynamically generate a PNG image with code
> like
>
> <?
> 126   header ("Content-type: image/png");
> 127  $im = ImageCreate(50,100);
>  ..
>  ..
>  ..
> 201   ImagePNG($im);
> ?>
>
> This code is embed in HTML file. The number on right are lines numbers
just
> for reference.
> I got error
>
> "Cannot add  header information -- header already sent by
> /var/www/html/php4/physics_01.php4
> on line 126."
>
> appears apache server is parsing the output and return this error message
in
> response to find "header
> information generated by line 126. I have 2 questions
>
>
> 1. Is there a way to test script outside apache -- without a  web server
> running.
> 2. Is this an apache configuration problem? I am using the default
> configuration which
>     works fine for mime type  text/html.
>
> Thanks for your help.
> [email protected]
>
>
>
>
>