Re: php cgi premature end of script headers

From: Date: Mon, 27 Nov 2000 23:35:55 +0000
Subject: Re: php cgi premature end of script headers
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27500@lists.php.net to get a copy of this message
Hi! Use <?php header("Location: http://www.yahoo.com"); ?> if you use echo "foo" the php-interpreter outputs Content-type; text/html before itself (not like perl); regards Folke -- Folke Ashberg Stage Internet Services GmbH Technical Development folke@fanstage.de folke@fanstage.de | Tel: +49 89 454591-77 | Fax: +49 89 454591-71 Kreillerstr. 21 | 81673 Munich | Germany | www.fanstage.de On Mon, 27 Nov 2000, Gregor Bruhin wrote: > , > > > > I use the latest php and apache. > > in the shell when I execute my php and my perl script I get (this is > correct!): > > ---------------------------------------------------------------------------- > -- > > ./test.cgi > > location: http://www.yahoo.com > > > > ---------------------------------------------------------------------------- > -- > > > > if I try trough the web I get a premature end of script header for the php > script and the perl script works, and in the shell the output is exactly > the same so why ??? i tried to make su httpd ans both output are the same > and are ok ... > > > > Here is the source of the scripts: > > ---------------------------------------------------------------------------- > -- > #!/usr/bin/php -q > > <?php > > echo "location: http://www.yahoo.com\n\n"; > > ?> > > ---------------------------------------------------------------------------- > -- > > #!/usr/bin/perl > > print "location: http://www.yahoo.com\n\n"; > > ---------------------------------------------------------------------------- > -- > > > > Thanks for your help ! > > Gregor Bruhin > > gb@swisszone.ch > >

« previous php.general (#27500) next »