Re: Header error while creating an Image

From: Date: Tue, 18 Dec 2001 17:02:35 +0000
Subject: Re: Header error while creating an Image
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-78108@lists.php.net to get a copy of this message
you dont have output buffering on, check php.ini or add it manually to an .htaccess. -- Chris Lee lee@mediawaveonline.com "J.F.Kishor" <kishor@ooty.tenet.res.in> wrote in message news:Pine.LNX.4.10.10112141205270.2505-100000@bulbul.ooty.tenet.res.in... > hello, > > I'am trying to create an image using php image functions > it gives a warning and outputs a image with GIF87a format, why does > this happen, could some help me out in this problem. > > This is the script > ------------------ > <? > Header("Content-type: image/gif"); > $string=implode($argv," "); > $im = imagecreatefromgif("images/Next.gif"); > $orange = ImageColorAllocate($im, 220, 210, 60); > $px = (imagesx($im)-7.5*strlen($string))/2; > ImageString($im,3,$px,9,$string,$orange); > ImageGif($im); > imagecolortransparent($im); > ImageDestroy($im); > ?> > > Warning alerted is > -------------------------------------------------------------------------- ---- > Warning: Cannot add header information - headers already sent by > (output started at /home/kuruvi1/kishor/public_html/GD/creatingIMG.php:2) in > /home/kuruvi1/kishor/public_html/GD/creatingIMG.php on line 4 > -------------------------------------------------------------------------- ---- > > Junk output is > --------------- > > -------------------------------------------------------------------------- --- > GIF87a9CU_11EraalUYIAAf11__O<99 @ ` @\*6Z>@<6#%,9I#< A"A CI"ACA E#YU ( @ > a#",EX(R X#Y"*(B H#I3> " EC< A [] > -------------------------------------------------------------------------- --- > > Thanks for sparing time for this mail > > with regards > > -JFK >

« previous php.general (#78108) next »