Upload file on IE8

------=_NextPart_000_0013_01CA9DE5.96854B30
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_0014_01CA9DE5.96854B30"


------=_NextPart_001_0014_01CA9DE5.96854B30
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit



Good Day,



I'm having an issue with IE8, when I go to load a file the
program is not filling the $_FILES['user_file']['type'] .

When I display "echo "Start".$_FILES['pix']['type']."End";"
in IE8 I get "StartEnd" with nothing in between. I expected "image/pjpeg".

On FireFox I get "image/jpeg".

Any suggestions?
Thanks,
...../Ernie













------=_NextPart_001_0014_01CA9DE5.96854B30
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:dt=3D"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta name=3D"Microsoft Theme 2.00" content=3D"rmnsque 011">
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
[at] font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
[at] font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
[at] font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
[at] font-face
{font-family:"Book Antiqua";
panose-1:2 4 6 2 5 3 5 3 3 4;}
[at] font-face
{font-family:"Ancestory SF";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri","sans-serif";
color:black;}
h1
{mso-style-priority:9;
mso-style-link:"Heading 1 Char";
margin-top:24.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:16.0pt;
font-family:"Calibri","sans-serif";
color:black;}
h2
{mso-style-priority:9;
mso-style-link:"Heading 2 Char";
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Calibri","sans-serif";
color:black;
font-weight:normal;}
h3
{mso-style-priority:9;
mso-style-link:"Heading 3 Char";
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Calibri","sans-serif";
color:black;
font-weight:normal;}
h4
{mso-style-priority:9;
mso-style-link:"Heading 4 Char";
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Calibri","sans-serif";
color:black;
font-weight:normal;}
h5
{mso-style-priority:9;
mso-style-link:"Heading 5 Char";
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:13.0pt;
font-family:"Calibri","sans-serif";
color:black;
font-weight:normal;}
h6
{mso-style-priority:9;
mso-style-link:"Heading 6 Char";
margin-top:10.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
page-break-after:avoid;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;
font-weight:normal;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#996600;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#666666;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Calibri","sans-serif";
color:black;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.Heading1Char
{mso-style-name:"Heading 1 Char";
mso-style-priority:9;
mso-style-link:"Heading 1";
font-family:"Book Antiqua","serif";
color:black;
font-weight:bold;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-priority:9;
mso-style-link:"Heading 2";
font-family:"Book Antiqua","serif";
color:black;}
span.Heading3Char
{mso-style-name:"Heading 3 Char";
mso-style-priority:9;
mso-style-link:"Heading 3";
font-family:"Times New Roman","serif";
color:black;}
span.Heading4Char
{mso-style-name:"Heading 4 Char";
mso-style-priority:9;
mso-style-link:"Heading 4";
font-family:"Times New Roman","serif";
color:black;}
span.Heading5Char
{mso-style-name:"Heading 5 Char";
mso-style-priority:9;
mso-style-link:"Heading 5";
font-family:"Times New Roman","serif";
color:black;}
span.Heading6Char
{mso-style-name:"Heading 6 Char";
mso-style-priority:9;
mso-style-link:"Heading 6";
font-family:"Times New Roman","serif";
color:black;}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
..MsoChpDefault
{mso-style-type:export-only;}
[at] page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=3Dwhite background=3D"cid:image001.jpg [at] 01CA9DE4.E9E90FB0" =
lang=3DEN-CA
link=3D"#996600" vlink=3D"#666666">
<img src=3D"cid:image001.jpg [at] 01CA9DE4.E9E90FB0"
v:src=3D"cid:image001.jpg [at] 01CA9DE4.E9E90FB0" v:shapes=3D"_x0000_Mail" =
width=3D0
height=3D0 class=3Dshape style=3D'display:none;width:0;height:0'><!--[if =
gte mso 9]><xml>
<v:background id=3D"_x0000_s1025" o:bwmode=3D"white" =
o:targetscreensize=3D"800,600">
<v:fill src=3D"cid:image001.jpg [at] 01CA9DE4.E9E90FB0" =
o:title=3D"romtextb" type=3D"frame" />
</v:background></xml><![endif]-->

<div class=3DSection1>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>Good Day,<o:p></o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'><o:p> </o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'>         &=
nbsp;      I’m
having an issue with IE8, when I go to load a file the program is not =
filling
the $_FILES['user_file']['type']  .<o:p></o:p></span></p>

<pre><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'>  =
;            When =
I display  “echo  =
"Start".$_FILES['pix']['type']."End";” =
 in IE8 I get “StartEnd” with nothing in between.  =
I expected “</span><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'>image/pjpeg".<o:p></o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'><o:p> </o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'>           &nbs=
p;        On FireFox I get =
</span><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif"'>“</sp=
an><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'>image/jpeg".<o:p></o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'><o:p> </o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'>           &nbs=
p;        Any =
suggestions?<o:p></o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'>Thanks,<o:p></o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'>..../Ernie<o:p></o:p></span></pre><pre><span
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif";color:#33333=
3'><o:p> </o:p></span></pre>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:windowtext'><o:p> </o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'><o:p> </o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'><o:p> </o:p></span></p>

<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Ancestory SF";
color:windowtext'><o:p> </o:p></span></p>

<p class=3DMsoNormal><o:p> </o:p></p>

</div>

</body>

</html>

------=_NextPart_001_0014_01CA9DE5.96854B30--

------=_NextPart_000_0013_01CA9DE5.96854B30--
Ernie Kemp [ Mo, 25 Januar 2010 23:41 ] [ ID #2030173 ]

Re: Upload file on IE8

--=-nqDSq9i+dfghOmbZ6TUF
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:

>
>
> Good Day,
>
>
>
> I=E2=80=99m having an issue with IE8, when I go to load a=
file
> the program is not filling the $_FILES['user_file']['type'] .
>
>
> When I display =E2=80=9Cecho "Start".$_FILES['pix']['type=
']."End";=E2=80=9D in IE8 I get =E2=80=9CStartEnd=E2=80=9D with nothing in=
between. I expected =E2=80=9Cimage/pjpeg".
>
> On FireFox I get =E2=80=9Cimage/jpeg".
>
> Any suggestions?
> Thanks,
> ..../Ernie
>
>
>
>

What do the other $_FILES fields say? Are they populated correctly?

I wouldn't rely on anything sent from the browser. IE is known to send
the mime type that matches the extension, not the contents of the file,
and for .jpg images it sends a different mime to every other browser
anyway, so it's pretty unreliable.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-nqDSq9i+dfghOmbZ6TUF--
Ashley Sheridan [ Mo, 25 Januar 2010 23:52 ] [ ID #2030175 ]

Re: Upload file on IE8

--001636c92336e2e0ac047e0599f4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp <ernie.kemp [at] sympatico.ca> wrote=
:

> Good Day,
>
>
>
> I=E2=80=99m having an issue with IE8, when I go to load a=
file the
> program is not filling the $_FILES['user_file']['type'] .
>
> When I display =E2=80=9Cecho "Start".$_FILES['pix']['type=
']."End";=E2=80=9D in IE8 I get =E2=80=9CStartEnd=E2=80=9D with nothing in=
between. I expected =E2=80=9Cimage/pjpeg".
>
>
>
> On FireFox I get =E2=80=9Cimage/jpeg".
>
>
>
> Any suggestions?
>
> Thanks,
>
> ..../Ernie
>
>
>
> I remember a setting from some elsewhere IE 8 was disable set file path
> location
> by default from the options dialog. Did you enabled this already ? If not=
,
> you may give it a shoot to see than !
>

> Hope this help
>
>
> Eric,
> Regards,
>

>
>
>
>
>

--001636c92336e2e0ac047e0599f4--
Eric Lee [ Di, 26 Januar 2010 00:33 ] [ ID #2030177 ]

Re: Upload file on IE8

--=-XjieBZnZd6nTuy+ROTd6
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, 2010-01-26 at 07:33 +0800, Eric Lee wrote:

> On Tue, Jan 26, 2010 at 6:41 AM, Ernie Kemp <ernie.kemp [at] sympatico.ca> wro=
te:
>
> > Good Day,
> >
> >
> >
> > I=E2=80=99m having an issue with IE8, when I go to load=
a file the
> > program is not filling the $_FILES['user_file']['type'] .
> >
> > When I display =E2=80=9Cecho "Start".$_FILES['pix']['ty=
pe']."End";=E2=80=9D in IE8 I get =E2=80=9CStartEnd=E2=80=9D with nothing =
in between. I expected =E2=80=9Cimage/pjpeg".
> >
> >
> >
> > On FireFox I get =E2=80=9Cimage/jpeg".
> >
> >
> >
> > Any suggestions?
> >
> > Thanks,
> >
> > ..../Ernie
> >
> >
> >
> > I remember a setting from some elsewhere IE 8 was disable set file pat=
h
> > location
> > by default from the options dialog. Did you enabled this already ? If n=
ot,
> > you may give it a shoot to see than !
> >
>
> > Hope this help
> >
> >
> > Eric,
> > Regards,
> >
>
> >
> >
> >
> >
> >


But you won't be able to guarantee every IE8 user will do this, so you
shouldn't develop the app in such a way that it needs to use the value
in the array. Also, as I've said, there isn't much point relying on this
value for any reason anyway, as it doesn't guarantee the file is
actually of that type.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-XjieBZnZd6nTuy+ROTd6--
Ashley Sheridan [ Di, 26 Januar 2010 00:52 ] [ ID #2030179 ]

RE: Upload file on IE8

------=_NextPart_000_0037_01CA9DF3.977BD7D0
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable









From: Ashley Sheridan [mailto:ash [at] ashleysheridan.co.uk]
Sent: January-25-10 5:53 PM
To: Ernie Kemp
Cc: 'PHP General List'
Subject: Re: [PHP] Upload file on IE8



On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:





Good Day,



I=E2=80=99m having an issue with IE8, when I go to load =
a file the program is not filling the $_FILES['user_file']['type'] .


When I display =E2=80=9Cecho =
"Start".$_FILES['pix']['type']."End";=E2=80=9D in IE8 I get =
=E2=80=9CStartEnd=E2=80=9D with nothing in between. I expected =
=E2=80=9Cimage/pjpeg".

On FireFox I get =E2=80=9Cimage/jpeg".

Any suggestions?
Thanks,
...../Ernie




What do the other $_FILES fields say? Are they populated correctly?

I wouldn't rely on anything sent from the browser. IE is known to send =
the mime type that matches the extension, not the contents of the file, =
and for .jpg images it sends a different mime to every other browser =
anyway, so it's pretty unreliable.


Thanks,
Ash
http://www.ashleysheridan.co.uk



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++=
+++

With IE8,

Using $_FILES the array results for =E2=80=98name=E2=80=99 has =
the name of the file but =E2=80=98type=E2=80=99, =
=E2=80=98tmp_name=E2=80=99 and =E2=80=98size=E2=80=99 are blanks.

I tried enabling the =E2=80=9Cfile path location=E2=80=9D in IE8 =
option but the results are the same for $_FILES.




Firefox works displays all the values in the $_FILES array.

There must be a better way. Suggestions?

Thanks,

...../Ernie


------=_NextPart_000_0037_01CA9DF3.977BD7D0--
Ernie Kemp [ Di, 26 Januar 2010 01:21 ] [ ID #2030180 ]

RE: Upload file on IE8

--=-MZQ2KjgLEzL7lhFV4L0B
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, 2010-01-25 at 19:21 -0500, Ernie Kemp wrote:

>
>
>
>
>
>
>
> From: Ashley Sheridan [mailto:ash [at] ashleysheridan.co.uk]
> Sent: January-25-10 5:53 PM
> To: Ernie Kemp
> Cc: 'PHP General List'
> Subject: Re: [PHP] Upload file on IE8
>
>
>
> On Mon, 2010-01-25 at 17:41 -0500, Ernie Kemp wrote:
>
>
>
>
>
> Good Day,
>
>
>
> I=E2=80=99m having an issue with IE8, when I go to load a=
file the program is not filling the $_FILES['user_file']['type'] .
>
>
> When I display =E2=80=9Cecho "Start".$_FILES['pix']['type=
']."End";=E2=80=9D in IE8 I get =E2=80=9CStartEnd=E2=80=9D with nothing in=
between. I expected =E2=80=9Cimage/pjpeg".
>
> On FireFox I get =E2=80=9Cimage/jpeg".
>
> Any suggestions?
> Thanks,
> ..../Ernie
>
>
>
>
> What do the other $_FILES fields say? Are they populated correctly?
>
> I wouldn't rely on anything sent from the browser. IE is known to send th=
e mime type that matches the extension, not the contents of the file, and f=
or .jpg images it sends a different mime to every other browser anyway, so =
it's pretty unreliable.
>
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++=
+++
>
> With IE8,
>
> Using $_FILES the array results for =E2=80=98name=E2=80=99 has the=
name of the file but =E2=80=98type=E2=80=99, =E2=80=98tmp_name=E2=80=99 an=
d =E2=80=98size=E2=80=99 are blanks.
>
> I tried enabling the =E2=80=9Cfile path location=E2=80=9D in IE8 opt=
ion but the results are the same for $_FILES.
>
>
>
>
> Firefox works displays all the values in the $_FILES array.
>
> There must be a better way. Suggestions?
>
> Thanks,
>
> ..../Ernie
>


Don't use the value. There are a few different ways in PHP to get the
mime type of a file, which it does based on the contents of the file and
not its extension. This prevents someone from uploading an executable
virus for example by just changing the last three letters of the
filename.

Have a look at fileinfo() for this sort of thing.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--=-MZQ2KjgLEzL7lhFV4L0B--
Ashley Sheridan [ Di, 26 Januar 2010 01:25 ] [ ID #2030181 ]
PHP » gmane.comp.php.general » Upload file on IE8

Vorheriges Thema: memory efficient hash table extension? like lchash ...
Nächstes Thema: XAMPP PHP 4/5