<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Chris Weldon's Blog</title>
	
	<link>http://www.chrisweldon.net</link>
	<description>Rants and tech solutions from your neighborly geek</description>
	<pubDate>Sat, 27 Jun 2009 02:51:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/chrisweldon" type="application/rss+xml" /><item>
		<title>PostgreSQL Group &amp; User Role Inheritance</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/iGS8jBB1-Dc/postgresql-group-user-role-inheritance</link>
		<comments>http://www.chrisweldon.net/2009/06/26/postgresql-group-user-role-inheritance#comments</comments>
		<pubDate>Sat, 27 Jun 2009 02:50:28 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[postgresql]]></category>

		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=236</guid>
		<description><![CDATA[As I&#8217;m trying to finish up one of my consulting projects (and enhance other active projects), I decided to take a nice long hard look a PostgreSQL permissions - the correct way of doing it. PostgreSQL applies the commonly accepted principle of assigning permissions to resources. They&#8217;re moving away from the concept of users and [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m trying to finish up one of my consulting projects (and enhance other active projects), I decided to take a nice long hard look a PostgreSQL permissions - the correct way of doing it. PostgreSQL applies the commonly accepted principle of assigning permissions to resources. They&#8217;re moving away from the concept of users and groups and more to roles. As of PostgreSQL 8.3, the primary command to create new users OR groups is <span style="font-family: monospace;">CREATE ROLE</span>. The existing <span style="font-family: monospace;">CREATE USER / CREATE GROUP</span> commands still exist, but are becoming non-existent in hopes of replacing the user / group permissions model with a strictly role-based model. </p>
<p>In an attempt to move my projects towards this model, I ended up running into several problems.<br />
<span id="more-236"></span><br />
You assign &#8220;users&#8221; to &#8220;groups&#8221; by doing the following:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">GRANT</span> role_group <span style="color: #993333; font-weight: bold;">TO</span> role_user;</pre></div></div>

<p>Where <span style="font-family: monospace;">role_group</span> is the name of the group role and <span style="font-family: monospace;">role_user</span> is the name of the user role. </p>
<p>The assignment of &#8220;users&#8221; to roles plays a particular importance in permissions assignment. Typically, the webapp model has been such that it connects as one user to the database to perform <span style="font-family: monospace;">SELECT, INSERT, UPDATE, and DELETE</span> queries. Thus, it was easy enough to simply:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">SELECT</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">INSERT</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">UPDATE</span><span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #993333; font-weight: bold;">TO</span> user;</pre></div></div>

<p>With PostgreSQL, you have to execute the above command for each table, sequence, and other object type in order to grant access to your tables. If you have 50 tables, that&#8217;s not a tedious task, but it&#8217;s certainly annoying. Now envision you need to grant access to your developers and/or analysts to be able to perform the same queries. Share the username and password of the webapp? This violates a lot of industry practices and will be very difficult to trace back which user accidentally (or maliciously) mucked with the data in an inappropriate fashion. </p>
<p>So, you&#8217;re stuck executing the same 50 queries however many times you need to grant access to the database. Now it&#8217;s laborious and you start asking &#8220;What&#8217;s the better way to do this?&#8221;. Roles. If you executed the same 50 queries above on the &#8220;group&#8221; role, then to grant another user access to those same tables, you execute only the single query to add them to the role and BAM! They have access&#8230;.or so you thought.</p>
<p>This is ultimately what this post was about. The PostgreSQL <span style="font-family: monospace;"><a href="http://www.postgresql.org/docs/8.3/static/sql-grant.html">GRANT</a></span> documentation doesn&#8217;t include anything indicating that there&#8217;s a bit of a caveat with <span style="font-family: monospace;">GRANT</span>ing access to group roles. </p>
<p>When you implement the solution above, you may find yourself scratching your head when your user, a member of a group that has access to the schema and table you&#8217;re trying to query, receives the following error message:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ERROR: permission denied for schema cfegroup</pre></div></div>

<p>Where <span style="font-family: monospace;">cfegroup</span> is the name of the schema; or, you get the following error message:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ERROR: permission denied for relation agency</pre></div></div>

<p>Where <span style="font-family: monospace;">agency</span> is the name of the table, then you have stumbled upon the same problem I had. Eventually, I found the answer still on the PostgreSQL documentation, but not in the <span style="font-family: monospace;">GRANT</span> section. Rather, the problem is indeed a permissions problem because your user is not acknowledging the role permissions. According to the <span style="font-family: monospace;"><a href="http://www.postgresql.org/docs/8.3/static/sql-createrole.html">CREATE ROLE</a></span> documentation:</p>
<pre>
These clauses determine whether a role "inherits" the privileges of roles it is a member of.
A role with the INHERIT attribute can automatically use whatever database privileges have
been granted to all roles it is directly or indirectly a member of. Without INHERIT, membership
in another role only grants the ability to SET ROLE to that other role; the privileges of the
other role are only available after having done so. If not specified, INHERIT is the default.
</pre>
<p>Thus, you simply need to make sure that your database &#8220;user&#8221; role has <span style="font-family: monospace;">INHERIT</span> on it. Once you have verified this is the case, the user should not have a problem accessing your objects. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/uREqMXFlyWSErd82lhRifiVp9JE/0/da"><img src="http://feedads.g.doubleclick.net/~a/uREqMXFlyWSErd82lhRifiVp9JE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/uREqMXFlyWSErd82lhRifiVp9JE/1/da"><img src="http://feedads.g.doubleclick.net/~a/uREqMXFlyWSErd82lhRifiVp9JE/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/06/26/postgresql-group-user-role-inheritance/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/06/26/postgresql-group-user-role-inheritance</feedburner:origLink></item>
		<item>
		<title>Zend Framework Update and Zend_Db Mocks</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/hgwXNBHK47U/zend-framework-update-and-zend_db-mocks</link>
		<comments>http://www.chrisweldon.net/2009/06/25/zend-framework-update-and-zend_db-mocks#comments</comments>
		<pubDate>Fri, 26 Jun 2009 01:02:22 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=232</guid>
		<description><![CDATA[Recently I upgraded one of my projects from 1.6.1 to the latest in branch-1.8.x of the Zend Framework. This resulted in most of my 1200+ unit tests breaking for that project. After several hours of trying to figure out the cause of the break, I managed to stumble onto the differences that is causing the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I upgraded one of my projects from 1.6.1 to the latest in branch-1.8.x of the Zend Framework. This resulted in most of my 1200+ unit tests breaking for that project. After several hours of trying to figure out the cause of the break, I managed to stumble onto the differences that is causing the problems I was experiencing.<br />
<span id="more-232"></span><br />
As I had blogged about in a recent post, the architecture of a couple of my Zend Framework applications involve me building a framework (of sorts) on-top of the Zend Framework, specifically for my applciation. This framework has it&#8217;s own Data Access Layer (DAO) which utilizes the <span style="font-family: monospace;">Zend_Db_Table_Abstract</span> to query against the database. However, when I wanted to test just the DAO logic (and not the Zend logic), I needed a way to help make sure that happens. This is where mocking comes into play. </p>
<p>In order to undertsand why PHPUnits mocking was not working, and what I had to do to fix it, it&#8217;s necessary for me to explain the concept of mocking. Assume that you have 2 classes, a controller and a DAO. Assume the controller talks to the DAO to make queries against the database. When running unit tests against the controller, you don&#8217;t want the DAO to actually connect to the database, much less worry about whether the logic in the DAO is valid or not. Mocking will help emulate the DAO, but because it&#8217;s a runtime-configurable object, you can tell it what to expect and what to do if the conditions are met. This helps you present assumptions that everything is handled correctly by the DAO, leaving the controller tests to truly test only the controller. </p>
<p>Now, typcially you will not actually mock an object, but rather mock an interface. The purpose behind this is important. When you mock an implemented class, typically the mock will execute the logic already programmed into that class, especially if it&#8217;s declared <span style="font-family: monospace;">final</span>. When mocking an interface, none of the methods are actually implemented, so it becomes a true mock - everything is 100% runtime-programmable.</p>
<p>Now, when I upgraded the version of Zend Framework I was using, this is the error I started getting:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Fatal error: Call to a member function quoteInto() on a non-object</pre></div></div>

<p>This was for the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> final <span style="color: #000000; font-weight: bold;">function</span> deleteById<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        try <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$where</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_dao<span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAdapter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">quoteInto</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id = ?'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_dao<span style="color: #339933;">-&gt;</span><span style="color: #004000;">delete</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$where</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Zend_Db_Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            throw <span style="color: #000000; font-weight: bold;">new</span> Cfegroup_Db_Exception<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Unable to delete record from database.'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCode</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Note that <span style="font-family: monospace;">$this->_dao</span> is an instance of a <span style="font-family: monospace;">Zend_Db_Table_Abstract</span> object as a <span class="font-family: monospace;">StaticDao</span>. Now, when stepping through the code, everything seemed okay. In fact, the <span style="font-family: monospace;">Zend_Db_Table_Abstract</span> object held the instance of the <span style="font-family: monospace;">Zend_Db_Adapter_Abstract</span> that it was supposed to hold, but the getAdapter() method did not return it. </p>
<p>The following subtle difference appeared between Zend Framework 1.6.1 and Zend Framework 1.8.x:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>     <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getAdapter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #339933;">---</span>
<span style="color: #339933;">&gt;</span>     <span style="color: #000000; font-weight: bold;">public</span> final <span style="color: #000000; font-weight: bold;">function</span> getAdapter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>The top is the newest version of the file and the bottom is the old. The <span class="font-family: monospace;">final</span> declaration had previously prevented the mock from being able to extend it and program it, whereas now the <span class="font-family: monospace;">getAdapter()</span> method is free to override and re-implement the method. However, when it&#8217;s not progarmmed via runtime code, it fails to do anything - not even revert back to it&#8217;s originally intended purpose. </p>
<p>In short, I had to add a method to the <span class="font-family: monospace;">StaticDao</span> that declared the <span class="font-family: monospace;">getAdapter()</span> method as final. Once that was done, the mocks stopped overriding the method and the unit tests continued working. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/ft-j4EroYrTrRlgAMxIpQgEd0J4/0/da"><img src="http://feedads.g.doubleclick.net/~a/ft-j4EroYrTrRlgAMxIpQgEd0J4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ft-j4EroYrTrRlgAMxIpQgEd0J4/1/da"><img src="http://feedads.g.doubleclick.net/~a/ft-j4EroYrTrRlgAMxIpQgEd0J4/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/06/25/zend-framework-update-and-zend_db-mocks/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/06/25/zend-framework-update-and-zend_db-mocks</feedburner:origLink></item>
		<item>
		<title>Zend Studio 7 Linux Problem</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/TCnfXIp9gz8/zend-studio-7-linux-problem</link>
		<comments>http://www.chrisweldon.net/2009/06/24/zend-studio-7-linux-problem#comments</comments>
		<pubDate>Thu, 25 Jun 2009 02:32:41 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[*nix]]></category>

		<category><![CDATA[gentoo]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=230</guid>
		<description><![CDATA[I seem to be surrounded by problems these days. Zend has announced that Zend Studio 7 is now in Beta, so I figured I&#8217;d go give it a try since I was having so many problems with Eclipse being sluggish and overall a piece of junk. Yes, I know Zend Studio 7 is based on [...]]]></description>
			<content:encoded><![CDATA[<p>I seem to be surrounded by problems these days. <a href="http://www.zend.com/">Zend</a> has announced that Zend Studio 7 is now in Beta, so I figured I&#8217;d go give it a try since I was having so many problems with Eclipse being sluggish and overall a piece of junk. Yes, I know Zend Studio 7 is based on Eclipse, but I can&#8217;t help but think that the slowness is a part of the PDT plugin I use for PHP development. </p>
<p>I&#8217;m running <a href="http://www.gentoo.org/">Gentoo</a> Linux AMD64 on a dual-screen monitor utilizing Xinerama. I ran into a problem when trying to start the installer for Zend Studio.<br />
<span id="more-230"></span></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
&nbsp;
Launching installer...
&nbsp;
'SWING' UI not supported by VM.  Reverting to AWT.
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
&nbsp;
Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: 1
	at sun.awt.X11GraphicsEnvironment.getDefaultScreenDevice(Unknown Source)
	at java.awt.Window.init(Unknown Source)
	at java.awt.Window.&lt;init&gt;(Unknown Source)
	at java.awt.Frame.&lt;init&gt;(Unknown Source)
	at java.awt.Frame.&lt;init&gt;(Unknown Source)
	at com.zerog.ia.installer.LifeCycleManager.g(DashoA8113)
	at com.zerog.ia.installer.LifeCycleManager.h(DashoA8113)
	at com.zerog.ia.installer.LifeCycleManager.a(DashoA8113)
	at com.zerog.ia.installer.Main.main(DashoA8113)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.zerog.lax.LAX.launch(DashoA8113)
	at com.zerog.lax.LAX.main(DashoA8113)
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)</pre></div></div>

<p>Some initial Googling indicated that I needed to install i386 compatible libraries. The odd thing about it was I had done so - probably several months ago in fact. However, I ultimately managed to find the temporary solution on the <a href="http://bugs.sun.com/view_bug.do?bug_id=6604044">Sun web site</a>, in that this was a Java bug relating to Xinerama. Basically, try running the installer on screen 0:0 instead of 0:1. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/V-qsJpYBOCGMbcmZrg-vNGs2EzM/0/da"><img src="http://feedads.g.doubleclick.net/~a/V-qsJpYBOCGMbcmZrg-vNGs2EzM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/V-qsJpYBOCGMbcmZrg-vNGs2EzM/1/da"><img src="http://feedads.g.doubleclick.net/~a/V-qsJpYBOCGMbcmZrg-vNGs2EzM/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/06/24/zend-studio-7-linux-problem/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/06/24/zend-studio-7-linux-problem</feedburner:origLink></item>
		<item>
		<title>TouchNet uPay Problems</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/vRVVxELeIqg/touchnet-upay-problems</link>
		<comments>http://www.chrisweldon.net/2009/06/23/touchnet-upay-problems#comments</comments>
		<pubDate>Tue, 23 Jun 2009 06:03:53 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=225</guid>
		<description><![CDATA[One of the projects I have been working on is integrating with the new TouchNet uPay system that the Texas A&#038;M University Department of Finance has contracted for credit card and electronic payments. I ended up running into a couple of &#8220;gotchas&#8221; on how to post users over to the web site. Please read on [...]]]></description>
			<content:encoded><![CDATA[<p>One of the projects I have been working on is integrating with the new TouchNet uPay system that the Texas A&#038;M University Department of Finance has contracted for credit card and electronic payments. I ended up running into a couple of &#8220;gotchas&#8221; on how to post users over to the web site. Please read on for the full details of problems (and their corresponding solutions).<br />
<span id="more-225"></span></p>
<h3>Posting Reveals Loading and Hangs</h3>
<p>One of the first problems I encountered when posting the user to the uPay site was that the site would &#8220;hang&#8221;. In essence, I would get a prompt of <strong>Loading, please wait&#8230;</strong>, and the site would go nowhere. When checking my JavaScript console, I got the following error message:</p>
<pre>
Error: document.getElementById("indexForm").submit is not a function
Source File: https://secure.touchnet.com:8443/C21490test_upay/web/index.jsp
Line: 39
</pre>
<p>This one took me a little while to debug, since the exact same JavaScript function that I used on my site to redirect the user to the uPay system basically had the <strong>exact</strong> same code. The solution came out to be painfully obvious - a form button with the name of <span style="font-family: monospace;">submit</span>. Since I had a form element with the same name as the function I was trying to call, JavaScript&#8217;s DOM was trying to make a function call out of an element in the form. In short, if you have a button on the page to submit users who have JavaScript disabled, make sure to name it something other than <span style="font-family: monospace;">submit</span>. </p>
<h3>Access Denied</h3>
<p>If you&#8217;ve read the TouchNet uPay documentation carefully, you&#8217;ll notice that the <span style="font-family: monospace;">VALIDATION_KEY</span> format is a <strong>base64</strong> encoded <strong>md5</strong> hash of the following (without the brackets):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[POSTING_KEY][EXT_TRANS_ID][AMT]</pre></div></div>

<p>So, PHP developers out there may be thinking their solution is as simple as:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #990000;">static</span> <span style="color: #000000; font-weight: bold;">function</span> createValidationKey<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postingKey</span><span style="color: #339933;">,</span> <span style="color: #000088;">$transactionId</span><span style="color: #339933;">,</span> <span style="color: #000088;">$amount</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$currency</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Currency<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'en_US'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$currency</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setFormat</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display'</span> <span style="color: #339933;">=&gt;</span> Zend_Currency<span style="color: #339933;">::</span><span style="color: #004000;">NO_SYMBOL</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$tmpString</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$postingKey</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$transactionId</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currency</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">toCurrency</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$amount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpString</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Sadly, this does not work. When the user is sent to the uPay site, they&#8217;re displayed the message <span style="color: red;">You do not have access to this site.</span>. This took a bit of looking into, and ultimately deals with how PHP handles md5 hashing and base64 encoding. </p>
<p>PHP&#8217;s md5 hash is hexidecimal and is returned as a string. <span style="font-family: monospace;">base64_encode</span> in PHP expects ASCII text to encode. When you pass the md5 hash directly into <span style="font-family: monospace;">base64_encode</span>, it doesn&#8217;t complain because technically what it&#8217;s operating on is nothing but ASCII text. However, you have to <span style="font-family: monospace;">pack()</span> the md5 hash prior to encoding in order to have base64_encode to generate the same data expected on the uPay system. The resulting solution is:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #990000;">static</span> <span style="color: #000000; font-weight: bold;">function</span> createValidationKey<span style="color: #009900;">&#40;</span><span style="color: #000088;">$postingKey</span><span style="color: #339933;">,</span> <span style="color: #000088;">$transactionId</span><span style="color: #339933;">,</span> <span style="color: #000088;">$amount</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$currency</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Currency<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'en_US'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$currency</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setFormat</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display'</span> <span style="color: #339933;">=&gt;</span> Zend_Currency<span style="color: #339933;">::</span><span style="color: #004000;">NO_SYMBOL</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$tmpString</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$postingKey</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$transactionId</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$currency</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">toCurrency</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$amount</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$hash</span> <span style="color: #339933;">=</span> <span style="color: #990000;">md5</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tmpString</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">// From http://www.bursar.gatech.edu/marketplace/EPay_System_Validation_Key.pdf</span>
	<span style="color: #000088;">$asciiHash</span> <span style="color: #339933;">=</span> <span style="color: #990000;">pack</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'H*'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$hash</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$asciiHash</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>My Googling yielded a <a href="http://www.bursar.gatech.edu/marketplace/EPay_System_Validation_Key.pdf">helpful PDF</a> with just what we were looking for. Thanks also go out to <a href="http://www.dataplex.org/">Ben Floyd</a> for working with me on finding this solution. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/0Jzc8N2GlpZZMjVuOBAzbzw2KXY/0/da"><img src="http://feedads.g.doubleclick.net/~a/0Jzc8N2GlpZZMjVuOBAzbzw2KXY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/0Jzc8N2GlpZZMjVuOBAzbzw2KXY/1/da"><img src="http://feedads.g.doubleclick.net/~a/0Jzc8N2GlpZZMjVuOBAzbzw2KXY/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/06/23/touchnet-upay-problems/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/06/23/touchnet-upay-problems</feedburner:origLink></item>
		<item>
		<title>I Hate PHP Sometimes</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/tGC74Je9QhY/i-hate-php-sometimes</link>
		<comments>http://www.chrisweldon.net/2009/06/14/i-hate-php-sometimes#comments</comments>
		<pubDate>Mon, 15 Jun 2009 04:07:59 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=223</guid>
		<description><![CDATA[As one of the first few languages I learned, PHP has a special place in my heart. I am able to do a lot with the language. But sometimes, I wish that the core development team would actually make it into a full object-oriented language. See more of the story for the exact reason.

I was [...]]]></description>
			<content:encoded><![CDATA[<p>As one of the first few languages I learned, PHP has a special place in my heart. I am able to do a lot with the language. But sometimes, I wish that the core development team would actually make it into a full object-oriented language. See more of the story for the exact reason.<br />
<span id="more-223"></span><br />
I was writing a compare function in one of my objects. However, I ran into a problem with trying to use the original <span style="font-family: monospace;">compare()</span> function I created because it was static, and the way I was trying to call it won&#8217;t be around until PHP 5.3.0:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> itemExists<span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$className</span> <span style="color: #339933;">=</span> <span style="color: #990000;">get_class</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_items <span style="color: #b1b100;">as</span> <span style="color: #000088;">$lItem</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$className</span> <span style="color: #339933;">==</span> <span style="color: #990000;">get_class</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lItem</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span>
                <span style="color: #000088;">$className</span><span style="color: #339933;">::</span><span style="color: #004000;">compare</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #339933;">,</span> <span style="color: #000088;">$lItem</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>In a nutshell, being able to call a static function for a class through a variable won&#8217;t be around till PHP 5.3.0. This is one of my pet peeves about PHP - not having all the OO features that other real OO languages already have.</p>
<p>Now, onto the second facet I hate - not being able to overload functions:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #009933; font-style: italic;">/**
     * Performs a comparison between two objects of this type to determine if they're equal or different
     * 
     * Currently, the return value returns -1 if $a-&gt;_id &lt; $b-&gt;_id, otherwise +1 if $a-&gt;_id &gt; $b-&gt;_id. 
     * It returns 0 if the ids are equal.
     * 
     * @param   Module $a
     * @param   Module $b
     * @return  int
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #990000;">static</span> <span style="color: #000000; font-weight: bold;">function</span> compare<span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$b</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
    	<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$b</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #cc66cc;">1</span> <span style="color: #339933;">:</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #009933; font-style: italic;">/**
     * Performs a comparison between this object and another object to determine if they're equal or equivalent
     * 
     * Refer to the rules of the static &lt;code&gt;compare()&lt;/code&gt; function for the results of the comparison. 
     * 
     * @param   Module $object
     * @return  int
     */</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> compare<span style="color: #009900;">&#40;</span><span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
    	<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #004000;">compare</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #000088;">$object</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

<p>The result when running unit tests:</p>
<pre>
Fatal error: Cannot redeclare Group::compare()
</pre>
<p><strong>*fumes*</strong></p>

<p><a href="http://feedads.g.doubleclick.net/~a/Ol9p77A_Ym6hf96OArAxb8u9kz8/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ol9p77A_Ym6hf96OArAxb8u9kz8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ol9p77A_Ym6hf96OArAxb8u9kz8/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ol9p77A_Ym6hf96OArAxb8u9kz8/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/06/14/i-hate-php-sometimes/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/06/14/i-hate-php-sometimes</feedburner:origLink></item>
		<item>
		<title>Star Trek Rocks</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/IrP-wHrZo7Y/star-trek-rocks</link>
		<comments>http://www.chrisweldon.net/2009/05/10/star-trek-rocks#comments</comments>
		<pubDate>Sun, 10 May 2009 21:00:55 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=221</guid>
		<description><![CDATA[I&#8217;ll keep this brief and won&#8217;t include any spoilers. Out of 10 Star Trek gets a 12. The movie didn&#8217;t just beat every last one of my expectations for the movie, it flat out obliterated it. I was really impressed by how much different it was from the old series, yet not. For those trekkie [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll keep this brief and won&#8217;t include any spoilers. Out of 10 Star Trek gets a 12. The movie didn&#8217;t just beat every last one of my expectations for the movie, it flat out obliterated it. I was really impressed by how much different it was from the old series, yet not. For those trekkie fans out there, you&#8217;ll definitely notice the things that are the same from the original series &#038; movies, and will hopefully like the fresh perspective and view that its taking to make it different from the past. Cheers. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/Fxq8uknZSmNb6blVuxt-lTDgMo4/0/da"><img src="http://feedads.g.doubleclick.net/~a/Fxq8uknZSmNb6blVuxt-lTDgMo4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Fxq8uknZSmNb6blVuxt-lTDgMo4/1/da"><img src="http://feedads.g.doubleclick.net/~a/Fxq8uknZSmNb6blVuxt-lTDgMo4/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/05/10/star-trek-rocks/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/05/10/star-trek-rocks</feedburner:origLink></item>
		<item>
		<title>Dojo Drag-n-Drop and Form Submission</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/qM1bKm2zDFE/dojo-drag-n-drop-and-form-submission</link>
		<comments>http://www.chrisweldon.net/2009/05/09/dojo-drag-n-drop-and-form-submission#comments</comments>
		<pubDate>Sat, 09 May 2009 21:00:44 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[dojo]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=219</guid>
		<description><![CDATA[While working on one of my consulting projects, I was having a difficult time finding documentation anywhere online on how to use the Dojo Drag-n-Drop (dojo.dnd) features with forms. I wasn&#8217;t too keen on making JSON calls or writing a whole-lotta JavaScript to solve my problem. Well, luckily I managed to derive a solution rather [...]]]></description>
			<content:encoded><![CDATA[<p>While working on one of my consulting projects, I was having a difficult time finding documentation anywhere online on how to use the Dojo Drag-n-Drop (<a href="http://api.dojotoolkit.org/jsdoc/1.3/dojo.dnd">dojo.dnd</a>) features with forms. I wasn&#8217;t too keen on making JSON calls or writing a whole-lotta JavaScript to solve my problem. Well, luckily I managed to derive a solution rather quickly. Read on for more details.</p>
<p><span id="more-219"></span></p>
<p>The solution more or less was me plugging into the vast functionality that Dojo has in each of its objects and some of its base methods. Because Dojo interacts and operates with the DOM so well, it&#8217;s very easy to write JavaScript code that will take what Dojo has already manipulated and continue to manipulate it some more. </p>
<p>I found a really explanatory <a href="http://www.sitepen.com/blog/2008/06/10/dojo-drag-and-drop-1/">blog about Dojo DND</a> and this started my basis of trying to implement a solution. However, their blog article didn&#8217;t address how to submit all of that data through a form - it was simply a live update and utilization of DND components. </p>
<p>What I ended up doing was separating my form (form created using a <a href="http://api.dojotoolkit.org/jsdoc/1.3/dijit.form">dijit.form</a> object) from my DND object blocks. I then had my Dojo buttons that subscribed onClick to a custom JavaScript method which gathered the list of &#8220;Subscribed&#8221; objects, populated the form with new input objects, and then submitted the form. Let&#8217;s look at the DND objects first.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;view&quot; width=&quot;100%&quot; style=&quot;padding-left: 100px;&quot;&gt;
	&lt;div class=&quot;catalogContainer&quot;&gt;
	    &lt;h2&gt;Available Chapters&lt;/h2&gt;
	    &lt;ul dojoType=&quot;dojo.dnd.Source&quot; accept=&quot;normal,subscribed&quot;
	        id=&quot;catalogNode&quot; class=&quot;container&quot;&gt;
	        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">chapters</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$chapter</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	           &lt;li class=&quot;dojoDndItem normal&quot; dndType=&quot;normal&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$chapter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
	               <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">escape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chapter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	           &lt;/li&gt;
	        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	    &lt;/ul&gt;
	&lt;/div&gt;
&nbsp;
	&lt;div class=&quot;cartContainer&quot;&gt;
	    &lt;h2&gt;Chapters Subscribed&lt;/h2&gt;
	    &lt;ol dojoType=&quot;dojo.dnd.Source&quot; accept=&quot;normal,subscribed&quot;
	        id=&quot;cartNode&quot; class=&quot;container&quot;&gt;
	        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">module</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getChapters</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$chapter</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	           &lt;li class=&quot;dojoDndItem subscribed&quot; id=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$chapter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; dndType=&quot;subscribed&quot;&gt;
	               <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">escape</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$chapter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	           &lt;/li&gt;
	        <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
	    &lt;/ol&gt;
	&lt;/div&gt;
	&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
	&lt;ul class=&quot;actions&quot;&gt;
        &lt;li&gt;
            &lt;button dojoType=&quot;dijit.form.Button&quot; type=&quot;button&quot; iconClass=&quot;dijitEditorIcon dijitEditorIconDelete&quot;
                    onClick=&quot;window.location.href = '<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                        <span style="color: #0000ff;">'moduleId'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">module</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'adminModuleView'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>'&quot;&gt;Cancel&lt;/button&gt;&amp;nbsp;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;button dojoType=&quot;dijit.form.Button&quot; type=&quot;button&quot; iconClass=&quot;saveIcon&quot;
                    onClick=&quot;submitModuleChaptersAction()&quot;&gt;Save&lt;/button&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;</pre></div></div>

<p>What you see above is the two DND divs (<strong>catalogContainer</strong> and <strong>cartContainer</strong>) and an unordered list of buttons (see <strong>ul class=&#8221;actions&#8221;</strong>). This is not wrapped in a form, but is almost entirely driven by the Dojo engine. In short, I am able to drag-n-drop objects from either the <strong>catalogContainer</strong> or <strong>cartContainer</strong>. I click either the <strong>Cancel</strong> or the <strong>Save</strong> button to continue. </p>
<p>The <strong>Save</strong> button is the key - it&#8217;s onClick method calls <strong>submitModuleChaptersAction()</strong>. Let&#8217;s take a look at what that&#8217;s doing.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/**
 * Submits the form for updating the list of available chapters
 *
 * This method gathers the list of chapters that are subscribed (in order) and drops them
 * into a Dojo form for submission to the action controller. 
 *
 * @return void
 */</span>
<span style="color: #003366; font-weight: bold;">function</span> submitModuleChaptersAction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> chapterSub <span style="color: #339933;">=</span> dojo.<span style="color: #660066;">byId</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'cartNode'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> chapterSubDndSrc <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> dojo.<span style="color: #660066;">dnd</span>.<span style="color: #660066;">Container</span><span style="color: #009900;">&#40;</span>chapterSub<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> chapterarray <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> idx <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
    chapterSubDndSrc.<span style="color: #660066;">getAllNodes</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">forEach</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>node<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        chapterarray<span style="color: #009900;">&#91;</span>idx<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> node.<span style="color: #660066;">id</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> idx<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> inp <span style="color: #339933;">=</span> dojo.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'input'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span> type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;hidden&quot;</span><span style="color: #339933;">,</span> <span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;chapterId[&quot;</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;]&quot;</span><span style="color: #339933;">,</span> value<span style="color: #339933;">:</span> chapterarray<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> 
            dojo.<span style="color: #660066;">byId</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'moduleChapterForm'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'last'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    dojo.<span style="color: #660066;">byId</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'moduleChapterForm'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This method fetches each of the nodes in the <strong>cartNode</strong> Dojo ID (aka <strong>cartContainer</strong>) and for each of them creates a new DOM object (a hidden input element). This DOM object is appended last to the form, and then the form is submitted. I recognize that the JavaScript code could be cleaned up, and will likely do that soon.</p>
<p>Oh yea, what form?</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div dojoType=&quot;dijit.form.Form&quot; name=&quot;moduleChapterForm&quot; jsId=&quot;moduleChapterForm&quot; id=&quot;moduleChapterForm&quot; 
        method=&quot;post&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">url</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'moduleChaptersSave'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
    &lt;input type=&quot;hidden&quot; name=&quot;moduleId&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #990000;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">module</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; /&gt;
&lt;/div&gt;</pre></div></div>

<p>This is the dijit form that I use to add new input elements. Likely I could have used a regular form, but I don&#8217;t really have the time to test it.</p>
<p>Hope this helps!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/cQXa3AUR5P99X-3IY3-Ol7BYOos/0/da"><img src="http://feedads.g.doubleclick.net/~a/cQXa3AUR5P99X-3IY3-Ol7BYOos/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/cQXa3AUR5P99X-3IY3-Ol7BYOos/1/da"><img src="http://feedads.g.doubleclick.net/~a/cQXa3AUR5P99X-3IY3-Ol7BYOos/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/05/09/dojo-drag-n-drop-and-form-submission/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/05/09/dojo-drag-n-drop-and-form-submission</feedburner:origLink></item>
		<item>
		<title>Vimperator and Tab Mix Plus</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/kHy6DY76Luw/vimperator-and-tab-mix-plus</link>
		<comments>http://www.chrisweldon.net/2009/05/07/vimperator-and-tab-mix-plus#comments</comments>
		<pubDate>Thu, 07 May 2009 17:39:33 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=217</guid>
		<description><![CDATA[I typically only install Mozilla Firefox plugins that I find really useful and help improve my browsing experience. Because I&#8217;m a hardcore Linux geek, I also love applications such as vim, which is a text-based, high-performance editor. When I head about Vimperator, I immediately grabbed it and started using it. The plugin was amazing in [...]]]></description>
			<content:encoded><![CDATA[<p>I typically only install <a href="http://www.mozilla.org/">Mozilla</a> <a href="http://www.getfirefox.com/">Firefox</a> plugins that I find really useful and help improve my browsing experience. Because I&#8217;m a hardcore Linux geek, I also love applications such as vim, which is a text-based, high-performance editor. When I head about <a href="vimperator.org">Vimperator</a>, I immediately grabbed it and started using it. The plugin was amazing in that it really helped me move away from that dreaded mouse and back to my keyboard, improving my overall efficiency. </p>
<p>Well, Vimperator recently released an upgrade to 2.0. This upgrade really overhauled the performance and indicates that the developers are serious about making sure this plugin is useful for its audience. It did, however, break compatability with one of my other plugins, <a href="https://addons.mozilla.org/en-US/firefox/addon/1122">Tab Mix Plus</a>. </p>
<p>Tab Mixx Plus is a great tool in that it can help manage your tab bar and do cool things such as make all tabs a fixed width and spill tabs over to other rows (so that if you have 40+ tabs open like me, you can still stay somewhat organized). Additionally, if you open new tabs from a link inside an existing tab, the color of the tabs will change so you can see which are related. However, upon reading about Vimperator 2.0 and Tab Mixx Plus, I found that the Vimperator team doesn&#8217;t prefer Tab Mixx Plus because of the way it interfaces with Firefox. </p>
<p>Their alternative is <a href="http://jomel.me.uk/software/firefox/tabkit/">Tab Kit</a>. In addition to being more standards compliant in terms of how it interfaces with the tabs in Firefox, it also has more features than Tab Mixx Plus and also is more efficient. This is another plugin that I&#8217;ve found helps improve Firefox performance, since I was hell bent on <a href="/2009/05/03/reducing-memory-consumption-in-firefox-3">reducing the amount of memory Firefox consumed</a> on my 4GB system. </p>
<p>Hope this helps. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/MBZFNZdShYa2H2bZSHmksrm9tV8/0/da"><img src="http://feedads.g.doubleclick.net/~a/MBZFNZdShYa2H2bZSHmksrm9tV8/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/MBZFNZdShYa2H2bZSHmksrm9tV8/1/da"><img src="http://feedads.g.doubleclick.net/~a/MBZFNZdShYa2H2bZSHmksrm9tV8/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/05/07/vimperator-and-tab-mix-plus/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/05/07/vimperator-and-tab-mix-plus</feedburner:origLink></item>
		<item>
		<title>Reducing Memory Consumption in Firefox 3</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/F6YWVHGx2iA/reducing-memory-consumption-in-firefox-3</link>
		<comments>http://www.chrisweldon.net/2009/05/03/reducing-memory-consumption-in-firefox-3#comments</comments>
		<pubDate>Mon, 04 May 2009 00:36:39 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[Systems Administration]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[gentoo]]></category>

		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=215</guid>
		<description><![CDATA[When Mozilla Firefox was still in Beta stages (e.g. pre-1.0), I fell in love with it. The browser was light-weight, standards-compliant, and much more secure than Internet Explorer. Ultimately, the thing that won me over was the fact that the browser had multiple tabs to allow me to browse multiple web sites without having to [...]]]></description>
			<content:encoded><![CDATA[<p>When Mozilla Firefox was still in Beta stages (e.g. pre-1.0), I fell in love with it. The browser was light-weight, standards-compliant, and much more secure than Internet Explorer. Ultimately, the thing that won me over was the fact that the browser had multiple tabs to allow me to browse multiple web sites without having to open a dozen different windows, yet still consumed very little memory. </p>
<p>Flash forward to today and we find that Firefox 3 is a bloated monster, especially on anyone&#8217;s computer that has more than 2GB of RAM. Why? Well, everything points to the caching that Firefox does behind the scene&#8217;s to make it have accellerated performance. However, after a certain point, this performance drops not just the browser, but the entire system. The caching algorithms by default use a percentage of total memory. Thus, the more memory you have, the greater initial percentage taken up by the caching system. So, on a system with 4GB of RAM (such as mine), I easily see Firefox consuming > 1GB of RAM - even with only 12 or so tabs open and things like Flash blocked. </p>
<p>I believe I have found a Firefox plugin that has managed to bring that memory bloating under control. The plugin is called <a href="https://addons.mozilla.org/en-US/firefox/addon/5972">RAMBack</a>. So far on my Linux system, Firefox has gone from consuming ~25% of memory (~1GB) to just 4-6% (roughly between 175MB and 225MB). I&#8217;m going to try this plugin out on different platforms and see how it compares, and I encourage anyone else to do the same if they want to see immediate performance. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/OvFS2gRZw03B_Dt64XKjpzAzASM/0/da"><img src="http://feedads.g.doubleclick.net/~a/OvFS2gRZw03B_Dt64XKjpzAzASM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/OvFS2gRZw03B_Dt64XKjpzAzASM/1/da"><img src="http://feedads.g.doubleclick.net/~a/OvFS2gRZw03B_Dt64XKjpzAzASM/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/05/03/reducing-memory-consumption-in-firefox-3/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/05/03/reducing-memory-consumption-in-firefox-3</feedburner:origLink></item>
		<item>
		<title>Virtual Mail - Individual Mailbox Filtering:q</title>
		<link>http://feedproxy.google.com/~r/chrisweldon/~3/fuNz1Gu47IE/virtual-mail-individual-mailbox-filtering</link>
		<comments>http://www.chrisweldon.net/2009/05/02/virtual-mail-individual-mailbox-filtering#comments</comments>
		<pubDate>Sat, 02 May 2009 18:18:29 +0000</pubDate>
		<dc:creator>Chris Weldon</dc:creator>
		
		<category><![CDATA[*nix]]></category>

		<category><![CDATA[gentoo]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[mail]]></category>

		<category><![CDATA[maildrop]]></category>

		<category><![CDATA[postfix]]></category>

		<category><![CDATA[Systems Administration]]></category>

		<guid isPermaLink="false">http://www.chrisweldon.net/?p=210</guid>
		<description><![CDATA[So, one of the things I&#8217;ve been working on is getting a nice Virtual Mail system setup for Cerberus&#8217; Enterprise Hosting Solution. One of the things I&#8217;ve come to be really annoyed with is the lack of being able to apply procmail filtering to my mailbox (getting ~100+ e-mails from systems logs every day really [...]]]></description>
			<content:encoded><![CDATA[<p>So, one of the things I&#8217;ve been working on is getting a nice Virtual Mail system setup for Cerberus&#8217; Enterprise Hosting Solution. One of the things I&#8217;ve come to be really annoyed with is the lack of being able to apply procmail filtering to my mailbox (getting ~100+ e-mails from systems logs every day really makes my phone&#8217;s battery drain trying to download them all). After scrounging around, I managed to find a nice solution for my virtual mail hosting.<br />
<span id="more-210"></span><br />
My system is setup has Postfix at the center. Before Postfix accepts any messages, it communicates with SQLgrey to greylist unknown hosts. This has resulted in a good bit (approximately 95% of spam) from being received. Once a mail message is delivered, I route to amavisd-new to check for SPAM and Viruses. Then, once it comes back to the Postfix server, it&#8217;s delivered to the recipient. (A graphic will come soon.)</p>
<p>For reading e-mails, I use courier-imap and courier-authlib. They connect to a PostgreSQL server to check the table of virtual users to see where it should look for my maildirs. </p>
<p>Now, the problem is it does virtual mailbox delivery. This bypasses any .forward files that might be in my virtual mailbox dir (e.g. /home/vmail/cerberusonline.com/cweldon/.forward does nothing) and just delivers straight into the maildir. According to <a href="http://www.google.com/url?sa=t&#038;source=web&#038;ct=res&#038;cd=1&#038;url=http%3A%2F%2Ftadek.pietraszek.org%2Fblog%2F2006%2F02%2F05%2Fpostfix-virtual-mailboxes-and-procmail-filtering%2F&#038;ei=gnX8SfOkNJLItge2zf3DCg&#038;usg=AFQjCNHxwvAhZXZaXXzdTI51zav40-JbRQ">Tadek&#8217;s Blog</a>, he read that using <strong>Maildrop</strong> looked to be the best solution as it can interface with the database to find the <strong>home</strong> and <strong>mailbox</strong> directories. </p>
<p>I came to find out that <strong>Maildrop</strong> is a subset of the <strong>Courier</strong> MTA. It&#8217;s actually supposed to replace procmail, and although it is written in C++ and is larger in size than procmail, it&#8217;s apparently more efficient at filtering and appropriately routing mail than procmail. The biggest problem I had though was there was little to no documentation on how to get procmail to lookup the user tables in Postgres and pick up the .mailfilter file appropriately. </p>
<p>It turns out, that if you already have <strong>courier-authlib</strong> setup and running on your system, there is nothing you need to do in order to get Maildrop to use it (you can specify the alternate <strong>-a</strong> flag to force Courier-AuthLib, but in my case it was unnecessary). The catch is you have to understand how you&#8217;ve got your lookups going. If you follow the <a href="http://www.postfix.org/MAILDROP_README.html">PostFix maildrop readme</a>, you&#8217;ll notice it states that using <strong>${RECIPIENT}</strong> works in most cases. In my setup, I&#8217;m doing lookups based on just username, which meant I had to use the following statement in my PostFix <strong>master.cf</strong> file:</p>
<pre>
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${user}
</pre>
<p>I found this out the hard way when I ran the following two commands on the command line:</p>
<pre>
root # maildrop -V 7 -d cweldon@cerberusonline.com
Invalid user specified.

root # maildrop -V 7 -d cweldon
maildrop: authlib: groupid=5000
maildrop: authlib: userid=5000
maildrop: authlib: logname=cweldon, home=/home/vmail/cerberusonline.com/cweldon/, mail=/home/vmail/cerberusonline.com/cweldon/.maildir/
maildrop: Changing to /home/vmail/cerberusonline.com/cweldon/
</pre>
<p>Maildrop did the lookup via authlib, as indicated by the second entry. Using <strong>authtest</strong>, the results are mimicked:</p>
<pre>
root # authtest cweldon@cerberusonline.com
Authentication FAILED: Operation not permitted
root # authtest cweldon
Authentication succeeded.

     Authenticated: cweldon  (uid 5000, gid 5000)
    Home Directory: /home/vmail/cerberusonline.com/cweldon/
           Maildir: /home/vmail/cerberusonline.com/cweldon/.maildir/
             Quota: (none)
Encrypted Password: NOT SHOWING
Cleartext Password: (none)
           Options: (none)
</pre>
<p>So, someone is likely asking how I have my <strong>maildroprc</strong> file setup. It&#8217;s rather simplistic:</p>
<pre>
# Global maildrop filter file

#DEFAULT="$HOME/.maildir/"

# Define variables
SHELL="/bin/bash"
#DEFAULT = "$HOME/.maildir"
#MAILDIR = "$HOME/.maildir"

#
# Logfile destination
#
logfile "${HOME}/.maildrop.log"

`test -r $HOME/.mailfilter`
if( $RETURNCODE == 0)
        {
        log "(==) Including $HOME/.mailfilter"
                exception {
                        include $HOME/.mailfilter
                }
        }
</pre>
<p>What this does is use the <strong>$HOME</strong> as returned by Courier-AuthLib to check if I have a <strong>.mailfilter</strong> in <strong>my</strong> virtual home directory. If I do, it includes that before dropping my mail into my maildir. </p>

<p><a href="http://feedads.g.doubleclick.net/~a/_Kd7Mhux7p_Cpa039v75vfek2pI/0/da"><img src="http://feedads.g.doubleclick.net/~a/_Kd7Mhux7p_Cpa039v75vfek2pI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_Kd7Mhux7p_Cpa039v75vfek2pI/1/da"><img src="http://feedads.g.doubleclick.net/~a/_Kd7Mhux7p_Cpa039v75vfek2pI/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.chrisweldon.net/2009/05/02/virtual-mail-individual-mailbox-filtering/feed</wfw:commentRss>
		<feedburner:origLink>http://www.chrisweldon.net/2009/05/02/virtual-mail-individual-mailbox-filtering</feedburner:origLink></item>
	</channel>
</rss>
