Re: Problems with headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 21 September 2005 09:34 pm, Graham Anderson wrote:
it doesn't look like there is anything wrong with your code. what you might 
check however is, is there a space or a newline before <?php
_nothing_ should come before <?php


> thanks Chris :)
>
> I changed the spaces but am still getting the same output errors:
> <b>Warning</b>:  Cannot modify header information - headers already
> sent by (output started at
> /home/www/siren/siren/fonovisa/skintest/Library/php/
> fonovisa_simple.php:1) in
> <b>/home/www/siren/siren/fonovisa/skintest/Library/php/
> fonovisa_simple.php</b> on line <b>11</b><br />
> <br />
> <b>Warning</b>:  Cannot modify header information - headers already
> sent by (output started at
> /home/www/siren/siren/fonovisa/skintest/Library/php/
> fonovisa_simple.php:1) in
> <b>/home/www/siren/siren/fonovisa/skintest/Library/php/
> fonovisa_simple.php</b> on line <b>12</b><br />
>
> Because I am echoing the $xml string AFTER the header info, I would
> assume the headers would work ?
> Is there some way to ensure that the headers come first ?
>
> many thanks
> g
>
> <?php
> $quote = "\"";
> $xml = '';
> $xml .= '<?xml version="1.0"?>'."\n";
> $xml .= '<?quicktime type="application/x-qtskin"?>'."\n";
> $xml .= '<skin>'."\n";
> $xml .= '<movie src=' . $quote.   "../../fonovisa.mov" .  $quote.
> '/>'."\n";
> $xml .= '<contentregion src=' .$quote.  "../images/mask.gif" .
> $quote.   '/>'."\n";
> $xml .= '<dragregion src=' .  $quote. "../images/drag.gif" .   $quote.
>   '/>'."\n";
> $xml .= '</skin>';
> header('Content-Type: video/quicktime'); //took out a space
> header ("Content-Length: ".strlen($xml));  // added a space
> echo $xml;
> ?>
>
> On Sep 21, 2005, at 7:25 PM, Chris Shiflett wrote:
> > Graham Anderson wrote:
> >> Even though I am defining Content-type as 'video/quicktime',
> >> the output is still text/html
> >> Also, Content-Length is not outputting properly either :(
> >
> > [snip]
> >
> >> header('Content-Type:  video/quicktime');
> >> header ("Content-Length:".strlen($xml));
> >
> > You have a superfluous space in your Content-Type header, and you're
> > missing a space in your Content-Length header.
> >
> > Those two need to share. :-)
> >
> > Your other error is due to output being generated prior to the
> > header() calls.
> >
> > Hope that helps.
> >
> > Chris
> >
> > --
> > Chris Shiflett
> > Brain Bulb, The PHP Consultancy
> > http://brainbulb.com/
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux