Re: Problems with headers

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

 



Ok, I think I figured it out .

I had to convert my BBedit text editor file to plain text and then copy/paste that text directly into a new server text file
So, I guess my $100+ text editor is screwing up the file ?
Is there some way to prevent this ?

My text encoding is in UTF-8 because I have been working with non-Latin languages of late... Is there some bullet proof way to prevent this...or some filtering script I should run ?
These 3 ?'s do not appear in BBedit file when I turn invisibles on...
I am working in OS X.


This is the output from my BBedit [my text editor] file on the server, my main text editor
Notice the 3 Question Marks at the beginning....

0000000   ?   ?   ?   <   ?   p   h   p  \n       $   x   m   l       =
0000020       <   <   <   E   O   B  \n   <   ?   x   m   l       v   e
0000040   r   s   i   o   n   =   "   1   .   0   "   ?   >  \n   <   ?
0000060   q   u   i   c   k   t   i   m   e       t   y   p   e   =   "
0000100   a   p   p   l   i   c   a   t   i   o   n   /   x   -   q   t
0000120   s   k   i   n   "   ?   >  \n   <   s   k   i   n   >  \n   <
0000140   m   o   v   i   e       s   r   c   =   "   .   .   /   .   .
0000160   /   f   o   n   o   v   i   s   a   .   m   o   v   "   /   >
0000200  \n   <   c   o   n   t   e   n   t   r   e   g   i   o   n
0000220   s   r   c   =   "   .   .   /   i   m   a   g   e   s   /   m
0000240   a   s   k   .   g   i   f   "   /   >  \n   <   d   r   a   g
0000260   r   e   g   i   o   n       s   r   c   =   "   .   .   /   i
0000300   m   a   g   e   s   /   d   r   a   g   .   g   i   f   "   /
0000320   >  \n   <   /   s   k   i   n   >  \n   E   O   B   ;  \n   h
0000340   e   a   d   e   r   (   "   A   c   c   e   p   t   -   R   a
0000360   n   g   e   s   :       b   y   t   e   s   "   )   ;  \n   h
0000400   e   a   d   e   r       (   "   C   o   n   t   e   n   t   -
0000420   L   e   n   g   t   h   :       "   .   s   t   r   l   e   n
0000440   (   $   x   m   l   )   )   ;  \n   h   e   a   d   e   r   (
0000460   '   C   o   n   t   e   n   t   -   T   y   p   e   :       v
0000500   i   d   e   o   /   q   u   i   c   k   t   i   m   e   '   )
0000520   ;  \n   e   c   h   o       $   x   m   l   ;  \n   ?   >  \n
0000540

the script is encoded as utf-8 in BBedit

Attachment: fonovisa_simplev2.php
Description: application/php




----------------
Plain Text File output
The plain text version does output properly :)
If I od-c the the plain text, I do not get the 3 Question Marks at the beginning

0000000   <   ?   p   h   p  \n       $   x   m   l       =       <   <
0000020   <   E   O   B  \n   <   ?   x   m   l       v   e   r   s   i
0000040   o   n   =   "   1   .   0   "   ?   >  \n   <   ?   q   u   i
0000060   c   k   t   i   m   e       t   y   p   e   =   "   a   p   p
0000100   l   i   c   a   t   i   o   n   /   x   -   q   t   s   k   i
0000120   n   "   ?   >  \n   <   s   k   i   n   >  \n   <   m   o   v
0000140   i   e       s   r   c   =   "   .   .   /   .   .   /   f   o
0000160   n   o   v   i   s   a   .   m   o   v   "   /   >  \n   <   c
0000200   o   n   t   e   n   t   r   e   g   i   o   n       s   r   c
0000220   =   "   .   .   /   i   m   a   g   e   s   /   m   a   s   k
0000240   .   g   i   f   "   /   >  \n   <   d   r   a   g   r   e   g
0000260   i   o   n       s   r   c   =   "   .   .   /   i   m   a   g
0000300   e   s   /   d   r   a   g   .   g   i   f   "   /   >  \n   <
0000320   /   s   k   i   n   >  \n   E   O   B   ;  \n   h   e   a   d
0000340   e   r   (   "   A   c   c   e   p   t   -   R   a   n   g   e
0000360   s   :       b   y   t   e   s   "   )   ;  \n   h   e   a   d
0000400   e   r       (   "   C   o   n   t   e   n   t   -   L   e   n
0000420   g   t   h   :       "   .   s   t   r   l   e   n   (   $   x
0000440   m   l   )   )   ;  \n   h   e   a   d   e   r   (   '   C   o
0000460   n   t   e   n   t   -   T   y   p   e   :       v   i   d   e
0000500   o   /   q   u   i   c   k   t   i   m   e   '   )   ;  \n   e
0000520   c   h   o       $   x   m   l   ;  \n   ?   >
0000534


many thanks :)
g

On Sep 22, 2005, at 10:15 AM, Rasmus Lerdorf wrote:

Graham Anderson wrote:
Thanks Rasmus :)
that is an incredibly cool tip: EOB
Surprised I did not see you at the Digital Rights [hollywood digital]
conference in LA early this week.
Upside: Free sushi and an ocean view. Downside: Lots of 'agency' types
and sales folk....


when  I access a straight movie file with no php, fonovisa.mov,
everything looks good when I curl it
HTTP/1.1 200 OK
Date: Thu, 22 Sep 2005 16:52:45 GMT
Server: Apache/1.3.33 (Unix) PHP/4.4.0 FrontPage/5.0.2.2510
Last-Modified: Tue, 20 Sep 2005 17:58:39 GMT
ETag: "1b28dcc-e3-43304dcf"
Accept-Ranges: bytes
Content-Length: 227
Content-Type: video/quicktime

* Connection #0 left intact
* Closing connection #0
<?xml version="1.0"?>
<?quicktime type="application/x-qtskin"?>
<skin>
<movie src="../../fonovisa.mov"/>
<contentregion src="../images/mask.gif"/>
<dragregion src="../images/drag.gif"/>
</skin>
--------

If I use PHP to generate the same output, I get the error: can not
modify the headers.
Could the file extension, .php, somehow be preventing the php script
from outputting properly ?

Do this:

od -c filename.php

And send us the output.  If it is really long, put it online somewhere.
You have a stray carriage return or some other weird character in there
somewhere.

-Rasmus

--
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