<?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>wax ideal &#187; code</title>
	<atom:link href="http://waxideal.com/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://waxideal.com/blog</link>
	<description>learning to be human, since 1984</description>
	<lastBuildDate>Sun, 25 Jul 2010 22:36:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>301 Redirects in Drupal Pages</title>
		<link>http://waxideal.com/blog/2010/05/15/301-redirects-in-drupal-pages/</link>
		<comments>http://waxideal.com/blog/2010/05/15/301-redirects-in-drupal-pages/#comments</comments>
		<pubDate>Sat, 15 May 2010 10:33:23 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=497</guid>
		<description><![CDATA[I recently ran into a problem with a Drupal site I designed and maintain. Here&#8217;s a quick explanation of the problem, and then the solution. The front page has a Views Slideshow Block that grabs node data from custom CCK types. These types contain an image to be displayed in the slideshow (but not the]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a problem with a Drupal site I designed and maintain. Here&#8217;s a quick explanation of the problem, and then the solution.</p>
<p>The front page has a Views Slideshow Block that grabs node data from custom CCK types. These types contain an image to be displayed in the slideshow (but not the node itself) and a checkbox for enabling or disabling the node from appearing in the Slideshow Block. The slideshow images by default link to the nodes from which they were created.</p>
<p>The problem is linking to a page rendered by Views. Since I can&#8217;t add a field for the image or checkbox in a view page (not that I know of, let me know if I&#8217;m wrong on this) I had to figure out a different way. And I did, but not without further glitches.</p>
<p>I added the image and checkbox fields to my Page content type and created a node with the appropriate image. It appeared in the slideshow and linked to the page. I then tried several methods to redirect the alias to the correct page. First, the Path Redirect Module. Fail. Then, cpanel&#8217;s .htaccess redirect configuration tool. Fail. <a title="Apache URL Rewriting Guide" href="http://httpd.apache.org/docs/2.2/rewrite/rewrite_guide.html" target="_blank">Then manual .htaccess configuration</a>. Fail.</p>
<p>I don&#8217;t really know why the .htaccess failed &#8211; I have suspicions it has to do simply with Apache not updating, the fact that I have the Global Redirect Module installed, the clean url directives that already exist in the .htaccess file, or some similar url rewriting conflict.</p>
<p>In a pinch, I added this snippet of code to the body of the page I created:</p>
<pre><code>&lt;?php
 header("HTTP/1.1 301 Moved Permanently");
 header("Location: http://www.mysite.com/aliasname");
 exit();
 ?&gt;
</code></pre>
<p>This delicious morsel did the trick, but not without a headache first. You&#8217;ll have to have access to posting PHP code, and post it as source, even if you select the PHP option.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/05/15/301-redirects-in-drupal-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing PHPList Delete/Merge Attributes Function</title>
		<link>http://waxideal.com/blog/2010/03/18/fixing-phplist-deletemerge-attributes-function/</link>
		<comments>http://waxideal.com/blog/2010/03/18/fixing-phplist-deletemerge-attributes-function/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:46:09 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=465</guid>
		<description><![CDATA[I recently installed PHPList v2.10.10 (the latest stable release) to manage an email campaign and ran into a slight problem. PHPList allows users to define their own form fields for lists &#8211; name, address, birthday, email, and so on. These fields are referred to as &#8220;attributes&#8221;. Almost any type of data can be configured by]]></description>
			<content:encoded><![CDATA[<p>I recently installed PHPList v2.10.10 (<a title="The latest stable release of PHPList" href="http://www.phplist.com/download" target="_blank">the latest stable release</a>) to manage an email campaign and ran into a slight problem. PHPList allows users to define their own form fields for lists &#8211; name, address, birthday, email, and so on. These fields are referred to as &#8220;attributes&#8221;. Almost any type of data can be configured by adding an attribute in PHPList. You then create a sign-up page and choose which attributes you want users to enter, and whether or not that attribute is required to complete list sign-up.</p>
<p>I started setting up my attributes and naturally, added one by accident. After finding a button deceivingly named &#8220;delete&#8221;, I clicked it to correct my error. An http request was sent and the page reloaded &#8211; but my attribute was still there, winking at me like an old man who &#8211; while sitting on his porch &#8211; witnessed your ice cream tumbling off its cone after the first lick.</p>
<p>Luckily, a quick search found a remedy so I pass it along to you, the ethereal inter-web user:</p>
<p><a title="Fix for PHPList delete/merge function" href="http://forums.phplist.com/viewtopic.php?f=17&amp;t=24502#p67476" target="_blank">http://forums.phplist.com/viewtopic.php?f=17&amp;t=24502#p67476</a></p>
<p>Take that, old man.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/03/18/fixing-phplist-deletemerge-attributes-function/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Inserting a span element into an anchor via Drupal&#8217;s $primary_links</title>
		<link>http://waxideal.com/blog/2010/02/22/inserting-a-span-element-into-an-anchor-via-drupals-primary_links/</link>
		<comments>http://waxideal.com/blog/2010/02/22/inserting-a-span-element-into-an-anchor-via-drupals-primary_links/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 03:54:36 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=421</guid>
		<description><![CDATA[I previously wrote about how to insert a span into a link, but after testing this method quickly failed when coupled with the Views module. When a Page view is created and assigned to a node url, everything is fine and dandy. The issues arise when you want a link to use an alias. Luckily,]]></description>
			<content:encoded><![CDATA[<p>I previously wrote about how to insert a span into a link, but after testing this method quickly failed when coupled with the Views module. When a Page view is created and assigned to a node url, everything is fine and dandy. The issues arise when you want a link to use an alias. Luckily, I&#8217;ve devised a really simple work around:</p>
<p>use the same code to generate your menu:</p>
<pre>&lt;?php if (!empty($primary_links)): ?&gt;
&lt;?php print theme('links', $primary_links, array('id' =&gt; 'nav')); ?&gt;
&lt;?php endif; ?&gt;
</pre>
<p>this calls the links() function inside of includes/theme.inc, which triggers the l() function in the includes/common.inc to write the primary links menu. We can&#8217;t override the l() entirely because other code uses it, so we&#8217;ll copy the code from theme.inc and override the l() function with a site template specific one. Here&#8217;s my code:</p>
<p>theme.inc</p>
<pre>function mytheme_links($links, $attributes = array('class' =&gt; 'links')) {
 global $language;
 $output = '';
 $options = array(
 'class' =&gt; '',
 'html' =&gt; FALSE,
 );

 if (count($links) &gt; 0) {
 $output = '&lt;ul' . drupal_attributes($attributes) .'&gt;';

 $num_links = count($links);
 $i = 1;

 foreach ($links as $key =&gt; $link) {
 $class = $key;

 $links['attributes']['title'] = $link['title'];
 // Add first, last and active classes to the list of links to help out themers.
 if ($i == 1) {
 $class .= ' first';
 }
 if ($i == $num_links) {
 $class .= ' signup last';
 $links['attributes']['class'] .= $class;
 }
 if (isset($link['href']) &amp;&amp; ($link['href'] == $_GET['q'] || ($link['href'] == '&lt;front&gt;' &amp;&amp; drupal_is_front_page()))
 &amp;&amp; (empty($link['language']) || $link['language']-&gt;language == $language-&gt;language)) {
 $class .= ' active';
 }
 $output .= '&lt;li' . drupal_attributes(array('class' =&gt; $class)) .'&gt;';

 if (isset($link['href'])) {
 // Pass in $link as $options, they share the same keys.

//here's my call to the overridden function
 $output .= mytheme_l($link['title'], $link['href'], $links);
 }
 else if (!empty($link['title'])) {
 // Some links are actually not links, but we wrap these in &lt;span&gt; for adding title and class attributes
 if (empty($link['html'])) {
 $link['title'] = check_plain($link['title']);
 }
 $span_attributes = '';
 if (isset($link['attributes'])) {
 $span_attributes = drupal_attributes($link['attributes']);
 }
 $output .= '&lt;span'. $span_attributes .'&gt;'. $link['title'] .'&lt;/span&gt;';
 }

 $i++;
 $output .= "&lt;/li&gt;\n";
 }

 $output .= '&lt;/ul&gt;';
 }

 return $output;
}</pre>
<p>and now the l() function in common.inc gets changed to mytheme_l():</p>
<pre>function mytheme_l($text, $path, $options = array()) {
 global $language;

 // Merge in defaults.
 $options += array(
 'attributes' =&gt; array(),
 'html' =&gt; FALSE,
 );

 // Append active class.
 if (($path == $_GET['q'] || ($path == '&lt;front&gt;' &amp;&amp; drupal_is_front_page())) &amp;&amp;
 (empty($options['language']) || $options['language']-&gt;language == $language-&gt;language)) {
 if (isset($options['attributes']['class'])) {
 $options['attributes']['class'] .= ' active';
 }
 else {
 $options['attributes']['class'] = 'active';
 }
 }

 // Remove all HTML and PHP tags from a tooltip. For best performance, we act only
 // if a quick strpos() pre-check gave a suspicion (because strip_tags() is expensive).
 if (isset($options['attributes']['title']) &amp;&amp; strpos($options['attributes']['title'], '&lt;') !== FALSE) {
 $options['attributes']['title'] = strip_tags($options['attributes']['title']);
 }
 // Inject a span inside the anchor tag for the purposes of this theme - NOTE - May have to remove check_plain() around
 // the $text variable
 return '&lt;a href="'. check_url(url($path, $options)) .'"'. drupal_attributes($options['attributes']) .'&gt;&lt;span&gt;'. ($options['html'] ? $text : check_plain($text)) .'&lt;/span&gt;&lt;/a&gt;';
}</pre>
<p>You can see that all I did was include the span element inside the anchor tag using simple php string concatenation. Until I can find a better solution, this does the trick. Don&#8217;t ask me about benchmarking, though&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/02/22/inserting-a-span-element-into-an-anchor-via-drupals-primary_links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Returning an Alias from primary_links&#8217;s links[&#039;href&#039;] &#8211; or &#8211; How I became a Drupal Wizard</title>
		<link>http://waxideal.com/blog/2010/02/18/returning-an-alias-from-primary_linkss-linkshref-or-how-i-became-a-drupal-wizard/</link>
		<comments>http://waxideal.com/blog/2010/02/18/returning-an-alias-from-primary_linkss-linkshref-or-how-i-became-a-drupal-wizard/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 11:39:44 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=415</guid>
		<description><![CDATA[I&#8217;m building a custom template in Drupal for the farm, and needed a way to spit out a custom implementation of primary_links navigation unordered list. I needed something like this: &#60;ul id="nav"&#62; &#60;li class="first"&#62;&#60;a href="link-goes-here" title="wow, how descriptive"&#62;&#60;span&#62;link 1 copy&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href="link-goes-here2" title="round 2, FIGHT!"&#62;&#60;span&#62;link 2 copy&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;/ul&#62; The spans inside the anchor tag are]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m building a custom template in Drupal for the farm, and needed a way to spit out a custom implementation of primary_links navigation unordered list. I needed something like this:</p>
<pre>&lt;ul id="nav"&gt;
  &lt;li class="first"&gt;&lt;a href="link-goes-here" title="wow, how descriptive"&gt;&lt;span&gt;link 1 copy&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="link-goes-here2" title="round 2, FIGHT!"&gt;&lt;span&gt;link 2 copy&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>The spans inside the anchor tag are valid xhtml strict, and necessary for the nested/floating backgrounds. The l() function in drupal does a fine job of spitting out valid code, but I also haven&#8217;t found anything to delimit the angle brackets in the span element.<br />
Here&#8217;s how I solved the problem.</p>
<p>First, I added a preprocess function in template.php and copied this chunk of code from root/includes/theme.inc:</p>
<pre>function theme_links($links, $attributes = array('class' =&gt; 'links')) {
 global $language;
 $output = '';

 if (count($links) &gt; 0) {
 $output = '&lt;ul'. drupal_attributes($attributes) .'&gt;';

 $num_links = count($links);
 $i = 1;

 foreach ($links as $key =&gt; $link) {
 $class = $key;

 // Add first, last and active classes to the list of links to help out themers.
 if ($i == 1) {
 $class .= ' first';
 }
 if ($i == $num_links) {
 $class .= ' last';
 }
 if (isset($link['href']) &amp;&amp; ($link['href'] == $_GET['q'] || ($link['href'] == '&lt;front&gt;' &amp;&amp; drupal_is_front_page()))
 &amp;&amp; (empty($link['language']) || $link['language']-&gt;language == $language-&gt;language)) {
 $class .= ' active';
 }
 $output .= '&lt;li'. drupal_attributes(array('class' =&gt; $class)) .'&gt;';

 if (isset($link['href'])) {
 // Pass in $link as $options, they share the same keys.
 $output .= l($link['title'], $link['href'], $link);
 }
 else if (!empty($link['title'])) {
 // Some links are actually not links, but we wrap these in &lt;span&gt; for adding title and class attributes
 if (empty($link['html'])) {
 $link['title'] = check_plain($link['title']);
 }
 $span_attributes = '';
 if (isset($link['attributes'])) {
 $span_attributes = drupal_attributes($link['attributes']);
 }
 $output .= '&lt;span'. $span_attributes .'&gt;'. $link['title'] .'&lt;/span&gt;';
 }

 $i++;
 $output .= "&lt;/li&gt;\n";
 }

 $output .= '&lt;/ul&gt;';
 }

 return $output;
}</pre>
<p>I then modified the code as follows:</p>
<pre>function stoneyacresfarm_links($links, $attributes = array('class' =&gt; 'links')) {
 global $language;
 $output = '';

 if (count($links) &gt; 0) {
 $output = '&lt;ul'. drupal_attributes($attributes) .'&gt;';

 $num_links = count($links);
 $i = 1;

 foreach ($links as $key =&gt; $link) {
 $class = $key;

 // Add first, last and active classes to the list of links to help out themers.
 if ($i == 1) {
 $class .= ' first';
 }
 if ($i == $num_links) {
 $class .= ' last';
 }
 if (isset($link['href']) &amp;&amp; ($link['href'] == $_GET['q'] || ($link['href'] == '&lt;front&gt;' &amp;&amp; drupal_is_front_page()))
 &amp;&amp; (empty($link['language']) || $link['language']-&gt;language == $language-&gt;language)) {
 $class .= ' active';
 }
 $output .= '&lt;li'. drupal_attributes(array('class' =&gt; $class)) .'&gt;';

 if (isset($link['href'])) {
 // Pass in $link as $options, they share the same keys.
 // here are the modifications
 $temphref = drupal_lookup_path('alias', $link['href'], '');
 $output .= '&lt;a href="' . $temphref . '" title="' . $link['title'] . '"&gt; &lt;span&gt;' . $link['title'] . '&lt;/span&gt;&lt;/a&gt;';
 }
 else if (!empty($link['title'])) {
 // Some links are actually not links, but we wrap these in &lt;span&gt; for adding title and class attributes
 if (empty($link['html'])) {
 $link['title'] = check_plain($link['title']);
 }
 $span_attributes = '';
 if (isset($link['attributes'])) {
 $span_attributes = drupal_attributes($link['attributes']);
 }
 $output .= '&lt;span'. $span_attributes .'&gt;'. $link['title'] .'&lt;/span&gt;';
 }

 $i++;
 $output .= "&lt;/li&gt;\n";
 }

 $output .= '&lt;/ul&gt;';
 }

 return $output;
}</pre>
<p>Lines 29 &amp; 30 are the brilliant bits. I scoured api.drupal.org till I found the  <code><a title="Given an alias, return its Drupal system URL if one exists. Given a Drupal system URL return one of its aliases if such a one exists. Otherwise, return FALSE." href="http://api.drupal.org/api/function/drupal_lookup_path/6">drupal_lookup_path</a></code> function. Follow the link for the arguments that can be passed in. I specified that I wanted an alias, gave it the path ( links['href'] ), and passed in a blank character for language.</p>
<p>This is all rendered out in my page-front.tpl.php and page.tpl.php files in the standard fashion:</p>
<pre>&lt;?php if (!empty($primary_links)): ?&gt;
  &lt;?php print theme('links', $primary_links, array('id' =&gt; 'nav')); ?&gt;
&lt;?php endif; ?&gt;
</pre>
<p>I hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/02/18/returning-an-alias-from-primary_linkss-linkshref-or-how-i-became-a-drupal-wizard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix IE 6 Floating Element Double Margin Bug</title>
		<link>http://waxideal.com/blog/2010/02/04/fix-ie-6-floating-element-double-margin-bug/</link>
		<comments>http://waxideal.com/blog/2010/02/04/fix-ie-6-floating-element-double-margin-bug/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 20:30:37 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html/xhmtl]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=392</guid>
		<description><![CDATA[If you read my last post, you know that I develop for IE6 and why. As is the case, IE6 throws annoying little gems at us, like its non-compliant box model, and the subject of today&#8217;s blog: the ever persistent double margin bug. As the title alludes to, IE6 doubles the right and/or left margin]]></description>
			<content:encoded><![CDATA[<p>If you read my<a title="Testing for IE6" href="http://waxideal.com/blog/2010/02/02/testing-for-ie6/" target="_self"> last post</a>, you know that I develop for IE6 and why. As is the case, IE6 throws annoying little gems at us, like its non-compliant box model, and the subject of today&#8217;s blog: the ever persistent double margin bug.</p>
<p>As the title alludes to, IE6 doubles the right and/or left margin on a floated element unless you declare:</p>
<pre style="padding-left: 30px;">display: inline;</pre>
<p>Don&#8217;t worry about block-level items losing their width or height: they won&#8217;t. This isn&#8217;t a comprehensive explanation of the fix; it works for the conditions specified.</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2010/02/04/fix-ie-6-floating-element-double-margin-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Links on How to Fill a Concave Polygon</title>
		<link>http://waxideal.com/blog/2009/11/18/links-on-how-to-fill-a-concave-po/</link>
		<comments>http://waxideal.com/blog/2009/11/18/links-on-how-to-fill-a-concave-po/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 03:31:04 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[equations]]></category>
		<category><![CDATA[graphics rendering]]></category>
		<category><![CDATA[jitter]]></category>
		<category><![CDATA[mathematics]]></category>
		<category><![CDATA[max]]></category>
		<category><![CDATA[openGL]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/?p=357</guid>
		<description><![CDATA[I&#8217;m working on a project in Max/Jitter and have run into a problem: dynamically filling a complex (concave, crossed, or holed) polygon. Here are some resources that explain the math behind find the area of and or filling such shapes: http://www.songho.ca/opengl/gl_tessellation.html http://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf http://www.freepatentsonline.com/EP0425189.html http://mathopenref.com/coordpolygonarea.html http://www.flipcode.com/archives/Polygon_Tessellation_In_OpenGL.shtml http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml http://glprogramming.com%Proxy-Connection: keep-alive Cache-Control: max-age=0 red/chapter02.html http://glprogramming.com/red/chapter11.html]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project in Max/Jitter and have run into a problem: dynamically filling a complex (concave, crossed, or holed) polygon. Here are some resources that explain the math behind find the area of and or filling such shapes:</p>
<ol>
<li><a href="http://www.songho.ca/opengl/gl_tessellation.html" target="_blank" title="the open gl tessalator">http://www.songho.ca/opengl/gl_tessellation.html</a></li>
<li><a href="http://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf" target="_blank">http://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf</a></li>
<li><a href="http://www.freepatentsonline.com/EP0425189.html" target="_blank">http://www.freepatentsonline.com/EP0425189.html</a></li>
<li><a href="http://mathopenref.com/coordpolygonarea.html" target="_blank">http://mathopenref.com/coordpolygonarea.html</a></li>
<li><a href="http://www.flipcode.com/archives/Polygon_Tessellation_In_OpenGL.shtml" target="_blank">http://www.flipcode.com/archives/Polygon_Tessellation_In_OpenGL.shtml</a></li>
<li><a href="http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml" target="_blank">http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml</a></li>
<li><a href="http://glprogramming.com/red/chapter02.html" target="_blank">http://glprogramming.com%Proxy-Connection: keep-alive<br />
Cache-Control: max-age=0</p>
<p>red/chapter02.html</a></li>
<li><a href="http://glprogramming.com/red/chapter11.html" target="_blank">http://glprogramming.com/red/chapter11.html</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2009/11/18/links-on-how-to-fill-a-concave-po/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal Fatal error: Allowed memory size of 33554432 bytes exhausted</title>
		<link>http://waxideal.com/blog/2009/01/17/drupal-fatal-error-allowed-memory-size-of-33554432-bytes-exhausted/</link>
		<comments>http://waxideal.com/blog/2009/01/17/drupal-fatal-error-allowed-memory-size-of-33554432-bytes-exhausted/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 03:11:57 +0000</pubDate>
		<dc:creator>sarandi</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://waxideal.com/blog/2009/01/17/drupal-fatal-error-allowed-memory-size-of-33554432-bytes-exhausted/</guid>
		<description><![CDATA[While installing the Calendar module for a Drupal site, I ran into the following error: Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/milwaul0/public_html/drupal/includes/theme.inc on line 729 Confounded, I searched the internet and found this: http://drupal.org/node/283579 The first option (making a php.ini file in the root) appears to]]></description>
			<content:encoded><![CDATA[<p>While installing the Calendar module for a Drupal site, I ran into the following error:</p>
<p>Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/milwaul0/public_html/drupal/includes/theme.inc on line 729</p>
<p>Confounded, I searched the internet and found this:</p>
<p>http://drupal.org/node/283579</p>
<p>The first option (making a php.ini file in the root) appears to need a restart of the webserver, so I tried the second option, allocating more memory to php via drupal using:</p>
<p>ini_set(&#8216;memory_limit&#8217;, &#8217;64M&#8217;); in the sites/default/settings.php file</p>
<p>But before that, I had to change the permissions of the file, which had been set to 555 (default, by the site admin I assume).</p>
<p>I initially set the memory to 64M to make sure it would work, since 33554432 bytes is 32MB. After  it worked, I noticed that the permissions for the file had been reset to 555, so I changed that again and allocated 32MB for php. It worked. If ever any problems arise, I&#8217;ll know what to do.</p>
<p>What&#8217;s weird is that this error was triggered while allocating 71 bytes. I don&#8217;t know why there was even an issue&#8230; anyone?</p>
]]></content:encoded>
			<wfw:commentRss>http://waxideal.com/blog/2009/01/17/drupal-fatal-error-allowed-memory-size-of-33554432-bytes-exhausted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
