<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: CodeIgniter Preflight Checker</title>
	<atom:link href="http://www.caseymclaughlin.com/2009/06/codeigniter-preflight-checker/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.caseymclaughlin.com/2009/06/codeigniter-preflight-checker/</link>
	<description>Online Portfolio</description>
	<lastBuildDate>Wed, 16 Dec 2009 20:08:50 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: McLaughlin Casey</title>
		<link>http://www.caseymclaughlin.com/2009/06/codeigniter-preflight-checker/comment-page-1/#comment-282</link>
		<dc:creator>McLaughlin Casey</dc:creator>
		<pubDate>Wed, 16 Dec 2009 20:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.caseymclaughlin.com/?p=84#comment-282</guid>
		<description>Wow.. Double fail on my part to your comment. 

1. Sorry about the massive delay in response.

2. The get_bytes function is another function I wrote that shouldn&#039;t have been included with the example:  I would use the following code instead:

&lt;code&gt;
//...
if (get_ini_max_memory() &lt; 33554432)
/...
&lt;/code&gt;

...and then include this function somewhere in your sourcecode:

&lt;code&gt;
function get_ini_max_memory()
{
	$value = trim(ini_get(&#039;memory_limit&#039;));
	
	$suffix = strtolower(substr($value, strlen($value)-1));
	$prefix = substr($value, 0, strlen($value)-1);
	
	//PHP.ini sometimes stores values as &quot;2g&quot; or &quot;3k&quot;.  If the value is stored that
	//way, then convert it here
	if ($suffix == &#039;k&#039;)
		$output = $prefix * 1024;
	elseif ($suffix == &#039;m&#039;)
		$output = $prefix * 1048576;
	elseif ($suffix == &#039;g&#039;)
		$output = $prefix * 1073741824;
	else
		$output = $value;
	
	return $output;
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Wow.. Double fail on my part to your comment. </p>
<p>1. Sorry about the massive delay in response.</p>
<p>2. The get_bytes function is another function I wrote that shouldn&#8217;t have been included with the example:  I would use the following code instead:</p>
<p><code><br />
//...<br />
if (get_ini_max_memory() &lt; 33554432)<br />
/...<br />
</code></p>
<p>&#8230;and then include this function somewhere in your sourcecode:</p>
<p><code><br />
function get_ini_max_memory()<br />
{<br />
	$value = trim(ini_get('memory_limit'));</p>
<p>	$suffix = strtolower(substr($value, strlen($value)-1));<br />
	$prefix = substr($value, 0, strlen($value)-1);</p>
<p>	//PHP.ini sometimes stores values as "2g" or "3k".  If the value is stored that<br />
	//way, then convert it here<br />
	if ($suffix == 'k')<br />
		$output = $prefix * 1024;<br />
	elseif ($suffix == 'm')<br />
		$output = $prefix * 1048576;<br />
	elseif ($suffix == 'g')<br />
		$output = $prefix * 1073741824;<br />
	else<br />
		$output = $value;</p>
<p>	return $output;<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deadelvis</title>
		<link>http://www.caseymclaughlin.com/2009/06/codeigniter-preflight-checker/comment-page-1/#comment-111</link>
		<dc:creator>deadelvis</dc:creator>
		<pubDate>Tue, 27 Oct 2009 23:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.caseymclaughlin.com/?p=84#comment-111</guid>
		<description>Thanks for the great example.
Where is the get_bytes function coming from though?

Fatal error: Call to undefined function get_bytes()</description>
		<content:encoded><![CDATA[<p>Thanks for the great example.<br />
Where is the get_bytes function coming from though?</p>
<p>Fatal error: Call to undefined function get_bytes()</p>
]]></content:encoded>
	</item>
</channel>
</rss>
