<?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>entwicklungsgedanken &#187; file-download</title>
	<atom:link href="http://www.entwicklungsgedanken.de/tag/file-download/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.entwicklungsgedanken.de</link>
	<description>Verschiedene Gedanken rund um die Softwareentwicklung</description>
	<lastBuildDate>Mon, 09 Jan 2012 14:47:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>[Reminder] Disable output-buffering when sending a download to the browser</title>
		<link>http://www.entwicklungsgedanken.de/2008/01/19/reminder-disable-output-buffering-when-sending-a-download-to-the-browser/</link>
		<comments>http://www.entwicklungsgedanken.de/2008/01/19/reminder-disable-output-buffering-when-sending-a-download-to-the-browser/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 09:24:35 +0000</pubDate>
		<dc:creator>Eric Bartels</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Verschiedenes]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[file-download]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[output-buffering]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.entwicklungsgedanken.de/2008/01/19/reminder-disable-output-buffering-when-sending-a-download-to-the-browser/</guid>
		<description><![CDATA[If you want to &#8220;send a file&#8221; to the browser (even if you do it in chunks) and your output-buffering is on you will get a fatal error when having large files. Fatal error: Allowed memory size of 0815 bytes exhausted It makes sense. The data of the file gets buffered. And after a while [...]]]></description>
			<content:encoded><![CDATA[<div class="lang-en"></div>
<p>If you want to &#8220;send a file&#8221; to the browser (even if you do it in chunks) and your <a href="http://de.php.net/manual/en/ref.outcontrol.php">output-buffering</a> is on you will get a fatal error when having large files.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Fatal error<span style="color: #339933;">:</span> Allowed memory size of <span style="color:#800080;">0815</span> bytes exhausted</pre></div></div>

<p>It makes sense. The data of the file gets buffered. And after a while the buffer is full.</p>
<p>
<strong>Always</strong> disable your <a href="http://de.php.net/manual/en/ref.outcontrol.php">output-buffering</a> before you start sending chunks of data (which represent a file download).
</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">ob_end_clean</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.entwicklungsgedanken.de/2008/01/19/reminder-disable-output-buffering-when-sending-a-download-to-the-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

