Re: imageJPEG problem.

From: Date: Tue, 25 Sep 2001 07:33:08 +0000
Subject: Re: imageJPEG problem.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-68653@lists.php.net to get a copy of this message
Stephan, Check that there are no html statements or blank lines above the <?php line. I had a few blank lines in my first program, and it gave me the same error message. Hugh ----- Original Message ----- From: Stefan Rusterholz <scripts@interaktion.ch> To: Johan Vikerskog (EMP) <Johan.Vikerskog@emp.ericsson.se>; <php-general@lists.php.net> Sent: Tuesday, September 25, 2001 12:13 AM Subject: Re: [PHP] imageJPEG problem. > > ----- Original Message ----- > From: "Johan Vikerskog (EMP)" <Johan.Vikerskog@emp.ericsson.se> > To: "'Stefan Rusterholz'" <scripts@interaktion.ch>; "Johan > Vikerskog (EMP)" > <Johan.Vikerskog@emp.ericsson.se>; <php-general@list.php.net> > Sent: Tuesday, September 25, 2001 9:07 AM > Subject: RE: [PHP] imageJPEG problem. > > > > Thanks for your answer but the problem remains. > > It says i allready have given the header information and everything comes > out in ascii. > > > > file://Johan > > > > -----Original Message----- > > From: Stefan Rusterholz [mailto:scripts@interaktion.ch] > > Sent: den 25 september 2001 08:55 > > To: Johan Vikerskog (EMP); php-general@list.php.net > > Subject: Re: [PHP] imageJPEG problem. > > > > > > ----- Original Message ----- > > From: "Johan Vikerskog (EMP)" <Johan.Vikerskog@emp.ericsson.se> > > To: <php-general@lists.php.net> > > Sent: Tuesday, September 25, 2001 8:47 AM > > Subject: [PHP] imageJPEG problem. > > > > > > > When trying to use a simple code like this below i receive an error > which > > says that it cant find the header. > > > > > > <? > > > Header("Content-type: image/jpeg"); > > > > I don't know about the other stuff of your script, but when I wrote a > > similar script, I took "content-type: image/jpg" and not 'jpeg'. > > Probably that's the point... > > > > > $im = imagecreatefromjpeg("./test.jpg"); > > > Imagejpeg($im,'',20); > > > ImageDestroy($im); > > > ?> > > > > > > It outputs the information in ascii and binary code. it doesn't show the > > picture > > > > > > Thanks for all the help you can give me. > > > file://Johan > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > make sure you run the php-part at the very top of the file: > <?php > header(...); > ?> > <HTML> > <HEAD> > ...and so on > > > if you have output before you execute the php part, your webserver will > generate the header for you and then it is impossible to send another header > (exactly because of what the warning tells you: the headers are already > sent - but by the server and not by you and the server normally assumes > text/html or text/plain). > > I hope, it helps > regards > > Stefan Rusterholz > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#68653) next »