Re: dynamic PNG image generation
| From: | Claus Bloch | Date: | Sun, 16 Sep 2001 16:08:42 +0000 |
| Subject: | Re: dynamic PNG image generation | ||
| References: | 1 | Groups: | php.lang |
| Request: | Send a blank email to php-lang+get-210@lists.php.net to get a copy of this message | ||
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" <rjae-1@worldnet.att.net> skrev i en meddelelse
news:20010902210747.67167.qmail@pb1.pair.com...
> 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.
> rjae-1@att.net
>
>
>
>
>