<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jeremykendall.net &#187; ie</title>
	<atom:link href="http://www.jeremykendall.net/tag/ie/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeremykendall.net</link>
	<description>{web developer, entrepreneur }</description>
	<lastBuildDate>Fri, 23 Jul 2010 19:18:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Image Upload Issues with Internet Explorer and image/pjpeg</title>
		<link>http://www.jeremykendall.net/2008/02/24/image-upload-issues-with-internet-explorer-and-imagepjpeg-2/</link>
		<comments>http://www.jeremykendall.net/2008/02/24/image-upload-issues-with-internet-explorer-and-imagepjpeg-2/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 16:50:49 +0000</pubDate>
		<dc:creator>Jeremy Kendall</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://dev.jeremykendall.net/wp/?p=4</guid>
		<description><![CDATA[I&#8217;m working on a project that uses Zend_Gdata, specifically Zend_Gdata_Photos, to manage photos in Google&#8217;s Picasa Web Albums.  When the application went into its testing phase, the image upload functionality began to throw exceptions.  While I could upload photos to Picasa without issue, my business partner John couldn&#8217;t upload any photos at all. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project that uses <a href="http://framework.zend.com/manual/en/zend.gdata.html">Zend_Gdata</a>, specifically <a href="http://framework.zend.com/manual/en/zend.gdata.photos.html">Zend_Gdata_Photos</a>, to manage photos in Google&#8217;s <a href="http://picasaweb.google.com/">Picasa Web Albums</a>.  When the application went into its testing phase, the image upload functionality began to throw exceptions.  While I could upload photos to Picasa without issue, my business partner <a href="http://www.jandbchildress.com/">John</a> couldn&#8217;t upload any photos at all.  The application kept throwing the following error:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Error Message: Exception Message: Expected response code 200, got 400</pre></div></div>

<p>Since the app worked fine for me, the issue didn&#8217;t seem to be with the code.  After some frustrating, unproductive troubleshooting, I finally built a file upload mockup and ran the $_FILES array through <a href="http://framework.zend.com/manual/en/zend.debug.html">Zend_Debug::dump()</a>.  I discovered that while Firefox reports the MIME type of a jpg as &#8220;image/jpeg&#8221;, Internet Explorer reports the MIME type as &#8220;image/pjpeg.&#8221;  Thanks a lot, Redmond.</p>
<p>As it turned out, the problem occurred when I tried to set the upload content type to &#8220;image/pjpeg&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$fd</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_service<span style="color: #339933;">-&gt;</span><span style="color: #004000;">newMediaFileSource</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;tmp_name&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fd</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I resolved the issue by adding a test for the pjpeg MIME type before setting the content type.  The new code looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/** Resolves issue where IE changes jpg MIME type to image/pjpeg, breaking upload */</span>
<span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> <span style="color: #0000ff;">&quot;image/pjpeg&quot;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">&quot;image/jpeg&quot;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fd</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_service<span style="color: #339933;">-&gt;</span><span style="color: #004000;">newMediaFileSource</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;tmp_name&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fd</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setContentType</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$photo</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;type&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The code snippets above come from an image upload helper method that I built (borrowing heavily from <a href="http://www.corywiles.com/">Cory Wiles</a>) to make working with Zend_Gdata_Photos a little easier.</p>
<p>If you&#8217;re having similar problems uploading images, regardless of the method that you&#8217;re using, check that MIME type and see if that&#8217;s not the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremykendall.net/2008/02/24/image-upload-issues-with-internet-explorer-and-imagepjpeg-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IEs4Linux Blank Screen Bug and Installation Issues</title>
		<link>http://www.jeremykendall.net/2008/02/16/ies4linux-blank-screen-bug-and-installation-issues/</link>
		<comments>http://www.jeremykendall.net/2008/02/16/ies4linux-blank-screen-bug-and-installation-issues/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 15:38:37 +0000</pubDate>
		<dc:creator>Jeremy Kendall</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://dev.jeremykendall.net/wp/?p=17</guid>
		<description><![CDATA[If you want / need to install Internet Explorer in Linux, I highly recommend IEs4Linux by S&#233;rgio Lopes.
IEs4Linux is the simpler way to have Microsoft Internet Explorer running on Linux (or any OS running Wine).
I recently purchased a new Dell 1420n with Ubuntu 7.10 pre-installed.  One of the first things I wanted to do [...]]]></description>
			<content:encoded><![CDATA[<p>If you want / need to install Internet Explorer in Linux, I highly recommend <a href="http://www.tatanka.com.br/ies4linux/page/Main_Page">IEs4Linux</a> by S&eacute;rgio Lopes.</p>
<blockquote><p>IEs4Linux is the simpler way to have Microsoft Internet Explorer running on Linux (or any OS running Wine).</p></blockquote>
<p>I recently purchased a new <a href="http://www.dell.com/ubuntu">Dell 1420n with Ubuntu 7.10 pre-installed</a>.  One of the first things I wanted to do was install all of my development tools, including IEs4Linux.  What should have been an easy installation turned into a nightmare.  I kept running into python errors that aborted the install.  Once I finally got the application to install it was unusable.  The IE toolbar was missing, including the address bar, the application would frequently crash, and I experienced maddening display bugs.</p>
<p>Apparently the blank screen bug has been a widespread issue.  S&eacute;rgio has <a href="http://www.tatanka.com.br/ies4linux/news/54">addressed it</a> on his blog and pushed an emergency release of IEs4Linux, version 2.99.0.1, to resolve this issue only.</p>
<p>That&#8217;s all well and good, but I still had the python issues to deal with.  What finally worked for me was to install IEs4Linux with the &#8211;no-gui flag, like so:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ ./ies4linux --no-gui</pre></div></div>

<p>For more information on installing IEs4Linux, including IE versions 5 and 5.5, visit the <a href="http://www.tatanka.com.br/ies4linux/page/Installation">IEs4Linux installation page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeremykendall.net/2008/02/16/ies4linux-blank-screen-bug-and-installation-issues/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
