<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/1.5.2" -->
<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/"
>

<channel>
	<title>RobertBolton.com</title>
	<link>http://www.robertbolton.com</link>
	<description>A lot to do about nothing</description>
	<pubDate>Fri, 08 Jan 2010 18:14:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>
	<language>en</language>

		<item>
		<title>Save Nvidia display settings Ubuntu 9.10</title>
		<link>http://www.robertbolton.com/save-nvidia-display-settings-ubuntu-910</link>
		<comments>http://www.robertbolton.com/save-nvidia-display-settings-ubuntu-910#comments</comments>
		<pubDate>Fri, 08 Jan 2010 18:13:13 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Uncategorized</category>
	<category>Ubuntu</category>
		<guid>http://www.robertbolton.com/save-nvidia-display-settings-ubuntu-910</guid>
		<description><![CDATA[	I received a new monitor for xmas and wanted to set up dual display (twinview) for Ubuntu 9.10. I already had the proprietary Nvidia drivers install, and it was very easy to get the dual monitors up and running. However, I always got this error when trying to save the configuration: Can&#8217;t parse /etc/X11/xorg.conf. And [...]]]></description>
			<content:encoded><![CDATA[	<p>I received a new monitor for xmas and wanted to set up dual display (twinview) for Ubuntu 9.10. I already had the proprietary Nvidia drivers install, and it was very easy to get the dual monitors up and running. However, I always got this error when trying to save the configuration: Can&#8217;t parse /etc/X11/xorg.conf. And upon restarting, only one screen would show and I would have to set it up again.</p>
	<p>Even when I launched Nvidia with sudo (<i>sudo nvidia-settings</i>), I still got this error on the command line:</p>
	<blockquote><p>VALIDATION ERROR:  Data incomplete in file /etc/X11/xorg.conf.<br />
Undefined Device &#8220;(null)&#8221; referenced by Screen &#8220;Default Screen&#8221;.</p></blockquote>
	<p>I moved <i>/etc/X11/xorg.conf</i> to a new filename, ran <i>sudo nvidia-settings</i> and was able to save as new xorg.conf file and now I have both monitors on start up. Also looks like you can simply <a href="http://awesomelinux.blogspot.com/2009/11/ubuntu-910-karmic-nvidia-settings-parse.html">edit the existing xorg.conf file</a> and you will be able to save your settings.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/save-nvidia-display-settings-ubuntu-910/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Sound Doesn&#8217;t Work Kubuntu 9.10 with PulseAudio</title>
		<link>http://www.robertbolton.com/sound-doesnt-work-kubuntu-910-with-pulseaudio</link>
		<comments>http://www.robertbolton.com/sound-doesnt-work-kubuntu-910-with-pulseaudio#comments</comments>
		<pubDate>Sat, 19 Dec 2009 02:04:57 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Uncategorized</category>
	<category>Ubuntu</category>
		<guid>http://www.robertbolton.com/sound-doesnt-work-kubuntu-910-with-pulseaudio</guid>
		<description><![CDATA[	It seems like every time I upgrade Kubuntu, my sound doesn&#8217;t work anymore. I guess &#8220;doesn&#8217;t work&#8221; isn&#8217;t the right term. It seems that the output is muted. If I type pavucontrol into the command line and then go to output devices on the volume control window that pops up,  the Internal Audio Analog [...]]]></description>
			<content:encoded><![CDATA[	<p>It seems like every time I upgrade Kubuntu, my sound doesn&#8217;t work anymore. I guess &#8220;doesn&#8217;t work&#8221; isn&#8217;t the right term. It seems that the output is muted. If I type pavucontrol into the command line and then go to output devices on the volume control window that pops up,  the Internal Audio Analog Stereo is muted. I don&#8217;t know why the pulse audio volume control is defaulting to that setting every time I upgrade, but I fiddled around with my sound settings a couple of years ago when I was having issues and that&#8217;s likely the culprit. I think I need to do a fresh install one of these days&#8230;.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/sound-doesnt-work-kubuntu-910-with-pulseaudio/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Zend_Auth and more than one record matches the supplied identity</title>
		<link>http://www.robertbolton.com/zend_auth-and-more-than-one-record-matches-the-supplied-identity</link>
		<comments>http://www.robertbolton.com/zend_auth-and-more-than-one-record-matches-the-supplied-identity#comments</comments>
		<pubDate>Sun, 13 Dec 2009 21:34:37 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Zend Framework</category>
		<guid>http://www.robertbolton.com/zend_auth-and-more-than-one-record-matches-the-supplied-identity</guid>
		<description><![CDATA[	The Zend_Auth Db adapter will fail if you have more than one record returned, which makes sense. However, when I have coded something like this in the past, I would check how many records were returned with a matching username and password. Zend_Auth looks at how many records are returned for the username field regardless [...]]]></description>
			<content:encoded><![CDATA[	<p>The Zend_Auth Db adapter will fail if you have more than one record returned, which makes sense. However, when I have coded something like this in the past, I would check how many records were returned with a matching username and password. Zend_Auth looks at how many records are returned for the username field regardless of whether the password matches, so you need to have a unique username field. I was trying to use a person&#8217;s last name and password to authenticate, but obviously people had the same last name, so it was failling.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/zend_auth-and-more-than-one-record-matches-the-supplied-identity/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Setting up a new Site with Zend Framework Application/Tool</title>
		<link>http://www.robertbolton.com/setting-up-a-new-site-with-zend-framework-applicationtool</link>
		<comments>http://www.robertbolton.com/setting-up-a-new-site-with-zend-framework-applicationtool#comments</comments>
		<pubDate>Wed, 02 Dec 2009 04:59:33 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Zend Framework</category>
		<guid>http://www.robertbolton.com/setting-up-a-new-site-with-zend-framework-applicationtool</guid>
		<description><![CDATA[	It&#8217;s been awhile since I had to set up a new site with Zend Framework, and I took the chance to play around with Zend_Tool_Project. Following the QuickStart guide, I had a site up and running in no time. But it did take me a little while to figure out how to get my modules [...]]]></description>
			<content:encoded><![CDATA[	<p>It&#8217;s been awhile since I had to set up a new site with Zend Framework, and I took the chance to play around with Zend_Tool_Project. Following the <a href="http://framework.zend.com/docs/quickstart">QuickStart guide</a>, I had a site up and running in no time. But it did take me a little while to figure out how to get my modules and custom library working with the site. </p>
	<h3>Modules</h3>
To get modules enabled, you first need to create a module with Zend_Tool_Project, or you can manually create a modules directory and add the module folder there. If I wanted to add a module called <i>cms</i>, I would create application/modules/cms or use the command line <i>zf create module cms</i>.</p>
	<p>Then, In application.ini, you need to add the following two lines:<br />
resources.modules[] =<br />
resources.frontController.moduleDirectory = APPLICATION_PATH &#8220;/modules&#8221;</p>
	<p>Finally, in order to load models and views, you need to add a Bootstrap.php file in the root of the modules - i.e. application/modules/cms/Bootstrap.php. In the module Bootstrap.php, place the following:<br />
<div id="phpizer_div_1" class="code">
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">class&nbsp;</span><span style="color: #0000BB">Cms_Bootstrap&nbsp;</span><span style="color: #007700">extends&nbsp;</span><span style="color: #0000BB">Zend_Application_Module_Bootstrap<br />
</span><span style="color: #007700">{<br />
}<br />
<br /></span><span style="color: #0000BB">?&gt;<br /></span><br />
</span><br />
</code></div>
	<p>You should be all set with modules now. Models you create within the module will use the naming convention of <i>Cms_Model_Foo</i> and controllers will be <i>Cms_IndexController</i> (when using Zend_Tool_Project and issuing <i>zf create controller index index-action-included=1 cms</i>, it names the controller class <i>IndexController</i> instead of <i>Cms_IndexController</i>?)</p>
	<h3>Autoloading Custom Library</h3>
	<p>The last thing I needed was to autoload my personal library which uses the naming convention <i>Bolton_</i>. My custom library resides in the same folder as the Zend library and is within my include path set in php.ini. In application.ini, you need to add the following line:
<pre>autoloaderNamespaces[] = \"Bolton_\"</pre>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/setting-up-a-new-site-with-zend-framework-applicationtool/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Zend_Service_Technorati and Connection Errors</title>
		<link>http://www.robertbolton.com/zend_service_technorati-and-connection-errors</link>
		<comments>http://www.robertbolton.com/zend_service_technorati-and-connection-errors#comments</comments>
		<pubDate>Wed, 04 Nov 2009 03:33:45 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Zend Framework</category>
		<guid>http://www.robertbolton.com/zend_service_technorati-and-connection-errors</guid>
		<description><![CDATA[	I had a site that uses Technorati&#8217;s API via Zend Framework- i.e. Zend_Service_Technorati. I noticed I am getting TCP connection errors via an exception (Message: Unable to Connect to tcp://api.technorati.com:80. Error #111: Connection refused), and upon going to Technorati&#8217;s site to look at the API, I  found out the new API is under works [...]]]></description>
			<content:encoded><![CDATA[	<p>I had a site that uses Technorati&#8217;s API via Zend Framework- i.e. Zend_Service_Technorati. I noticed I am getting TCP connection errors via an exception (Message: Unable to Connect to tcp://api.technorati.com:80. Error #111: Connection refused), and upon going to Technorati&#8217;s site to look at the <a href="http://technorati.com/developers">API</a>, I  found out the new API is under works and the old API is available until October 25th, 2009.  It is November 3rd, the old API apparently doesn&#8217;t work and the new API isn&#8217;t released. Really? Am I missing something here? TCP connection failing tells me they are rejecting completely rejecting the TCP connection, which leads me to believe they have shut off the API. Searching on <a href="http://twitter.com/#search?q=technorati%20api">Twitter</a> confirms this, although having an existing key doesn&#8217;t seem to matter&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/zend_service_technorati-and-connection-errors/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>PHPUnit and Mock Object Exactly Method</title>
		<link>http://www.robertbolton.com/phpunit-and-mock-object-exactly-method</link>
		<comments>http://www.robertbolton.com/phpunit-and-mock-object-exactly-method#comments</comments>
		<pubDate>Sun, 01 Nov 2009 17:49:19 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>PHP</category>
		<guid>http://www.robertbolton.com/phpunit-and-mock-object-exactly-method</guid>
		<description><![CDATA[	

&#60;?php$mapper-&#62;expects($this-&#62;exactly(&#8216;2&#8242;))-&#62;method(&#8216;delete&#8217;);
$mapper-&#62;expects($this-&#62;exactly(2))-&#62;method(&#8216;delete&#8217;);
?&#62;


	The two above lines of code don&#8217;t behave the same. When passing in 2 as a string instead of a number, PHPUnit declares it a failure:

Em_Model_Collection_MapperTest::testDeleteCollectionWithJoinTable
Expectation failed for method name is equal to  when invoked 2 time(s).
Method was expected to be called 2 times, actually called 2 times.

]]></description>
			<content:encoded><![CDATA[	<div id="phpizer_div_1" class="code">
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&lt;?php<br />$mapper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">expects</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">exactly</span><span style="color: #007700">(</span><span style="color: #DD0000">&#8216;2&#8242;</span><span style="color: #007700">))-&gt;</span><span style="color: #0000BB">method</span><span style="color: #007700">(</span><span style="color: #DD0000">&#8216;delete&#8217;</span><span style="color: #007700">);<br />
</span><span style="color: #0000BB">$mapper</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">expects</span><span style="color: #007700">(</span><span style="color: #0000BB">$this</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">exactly</span><span style="color: #007700">(</span><span style="color: #0000BB">2</span><span style="color: #007700">))-&gt;</span><span style="color: #0000BB">method</span><span style="color: #007700">(</span><span style="color: #DD0000">&#8216;delete&#8217;</span><span style="color: #007700">);<br />
<br /></span><span style="color: #0000BB">?&gt;<br /></span><br />
</span><br />
</code></div>
	<p>The two above lines of code don&#8217;t behave the same. When passing in 2 as a string instead of a number, PHPUnit declares it a failure:
<pre>
Em_Model_Collection_MapperTest::testDeleteCollectionWithJoinTable
Expectation failed for method name is equal to <string :delete> when invoked 2 time(s).
Method was expected to be called 2 times, actually called 2 times.
</string></pre>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/phpunit-and-mock-object-exactly-method/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>MooTools, form send function and b.lastIndexOf is not a function error</title>
		<link>http://www.robertbolton.com/mootools-form-send-function-and-blastindexof-is-not-a-function-error</link>
		<comments>http://www.robertbolton.com/mootools-form-send-function-and-blastindexof-is-not-a-function-error#comments</comments>
		<pubDate>Thu, 15 Oct 2009 22:07:50 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>Uncategorized</category>
	<category>JavaScript</category>
		<guid>http://www.robertbolton.com/mootools-form-send-function-and-blastindexof-is-not-a-function-error</guid>
		<description><![CDATA[	I am new to MooTools and was using MooTools 1.2.3 to submit a form via Ajax - pretty standard stuff. When trying to put in callbacks for onSuccess,onRequest, etc&#8230; I kept getting JavaScript errors (b.lastIndexOf is not a function).  Looks like you need to use set() function first, then call send(). MooTools must have [...]]]></description>
			<content:encoded><![CDATA[	<p>I am new to MooTools and was using MooTools 1.2.3 to submit a form via Ajax - pretty standard stuff. When trying to put in callbacks for onSuccess,onRequest, etc&#8230; I kept getting JavaScript errors (b.lastIndexOf is not a function).  Looks like you need to use set() function first, then call send(). MooTools must have been updated, because there are a lot of examples on the intraweb that do not do this, but work in my browser. To add to my confustion, you can call send() on the form without set first as long as you don&#8217;t pass an object with callbacks as a parameter in send().<br />
<b>This works</b>
<pre>            window.addEvent('domready', function() {
                $('myForm').addEvent('submit',function(event) {
                    event.preventDefault();
                    this.send();
                })
            });
</pre>
	<p><b>This does not work</b>
<pre>
            window.addEvent('domready', function() {
                $('myForm').addEvent('submit',function(event) {
                    event.preventDefault();
                    this.send({onComplete:function(){alert('this');}});
                })
            });
</pre>
	<p><b>This works with callbacks</b>
<pre>
            window.addEvent('domready', function() {
                $('myForm').addEvent('submit',function(event) {
                    event.preventDefault();
                    this.set('send',{onComplete:function(){
                            alert('this');
                        }
                    }).send();
                })
            });
</pre>
	<p>Anyways, after a day of playing with MooTools, I have say I am impressed. Not sure why, but I think this is my favorite framework. I can&#8217;t say I have much experience with JS frameworks, and my JavaScript is pretty bad these days, but I am impressed with MooTools so far.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/mootools-form-send-function-and-blastindexof-is-not-a-function-error/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>symlink with FTP</title>
		<link>http://www.robertbolton.com/symlink-with-ftp</link>
		<comments>http://www.robertbolton.com/symlink-with-ftp#comments</comments>
		<pubDate>Tue, 29 Sep 2009 00:16:20 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>PHP</category>
	<category>Linux</category>
		<guid>http://www.robertbolton.com/symlink-with-ftp</guid>
		<description><![CDATA[	Apparently you can&#8217;t use FTP for symlinks? It&#8217;s been so long since I have mucked around with FTP, that I didn&#8217;t realize you could not create symlinks. I have an old site I still maintain and had to move it to a new hosting provider and the new provider did not give SSH access (well [...]]]></description>
			<content:encoded><![CDATA[	<p>Apparently you can&#8217;t use FTP for symlinks? It&#8217;s been so long since I have mucked around with FTP, that I didn&#8217;t realize you could not create symlinks. I have an old site I still maintain and had to move it to a new hosting provider and the new provider did not give SSH access (well at least without charging for it). PHP to the rescue:<br />
<div id="phpizer_div_1" class="code">
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&lt;?php<br />symlink</span><span style="color: #007700">(</span><span style="color: #DD0000">&#8216;../gallery&#8217;</span><span style="color: #007700">,</span><span style="color: #DD0000">&#8216;gallery&#8217;</span><span style="color: #007700">);<br />
<br /></span><span style="color: #0000BB">?&gt;<br /></span><br />
</span><br />
</code></div>
	<p>Use the <a href="http://us2.php.net/symlink">symlink command in PHP</a>. Obviously you need to have the proper permissions, and since PHP may be running as a different user, your mileage may very. But it worked for me&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/symlink-with-ftp/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Zend_Acl with User Specific Permissions</title>
		<link>http://www.robertbolton.com/zend_acl-with-user-specific-permissions</link>
		<comments>http://www.robertbolton.com/zend_acl-with-user-specific-permissions#comments</comments>
		<pubDate>Sun, 23 Aug 2009 16:40:12 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>PHP</category>
	<category>Zend Framework</category>
		<guid>http://www.robertbolton.com/zend_acl-with-user-specific-permissions</guid>
		<description><![CDATA[	There are many articles around explaining Zend_Acl and how to use it within a CMS like system where generic roles apply - i.e. an admin can do anything, a guest can leave a comment and an author can write articles. But I was having a hard time figuring out how to elegantly enforce user specific [...]]]></description>
			<content:encoded><![CDATA[	<p>There are many articles around explaining Zend_Acl and how to use it within a CMS like system where generic roles apply - i.e. an admin can do anything, a guest can leave a comment and an author can write articles. But I was having a hard time figuring out how to elegantly enforce user specific permissions in addition to generic permissions For example, an author can save a new article, but can only update or delete an article that they &#8220;own&#8221;. I was trying to use assertions, but the role object in the assertion was turned into a generic Zend_Acl_Role object, even though I was using my own role object that implemented Zend_Acl_Role_Interface. Therefore, I couldn&#8217;t check the userId of the role in the assertion and was trying to pass responsibility back onto the object that was checking the acl.</p>
	<p>It looks like this has all been fixed in 1.9.1, and <a href="http://ralphschindler.com/2009/08/13/dynamic-assertions-for-zend_acl-in-zf">Ralph</a> does a good job of explaining the details. I have yet to try the improvements, but looking forward to refactoring my code to use the new and improved assertions.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/zend_acl-with-user-specific-permissions/feed/</wfw:commentRSS>
	</item>
		<item>
		<title>Slicehost VPS</title>
		<link>http://www.robertbolton.com/slicehost-vps</link>
		<comments>http://www.robertbolton.com/slicehost-vps#comments</comments>
		<pubDate>Wed, 08 Jul 2009 03:19:34 +0000</pubDate>
		<dc:creator>Administrator</dc:creator>
		
	<category>PHP</category>
	<category>Linux</category>
		<guid>http://www.robertbolton.com/slicehost-vps</guid>
		<description><![CDATA[	I signed up for a VPS on Slicehost today, and am very impressed. The interface is refreshingly basic and I was up and running in no time. Their articles are absolutely amazing, and worth the read even if you don&#8217;t use their services.  I know Ubuntu somewhat, but am far from an expert. Using [...]]]></description>
			<content:encoded><![CDATA[	<p>I signed up for a VPS on <a href="https://manage.slicehost.com/customers/new?referrer=e33a403086f6d5689b2deb44857ba7fb">Slicehost</a> today, and am very impressed. The interface is refreshingly basic and I was up and running in no time. Their <a href="http://articles.slicehost.com/">articles</a> are absolutely amazing, and worth the read even if you don&#8217;t use their services.  I know Ubuntu somewhat, but am far from an expert. Using the <a href="http://articles.slicehost.com/2008/4/25/ubuntu-hardy-setup-page-1">Ubuntu set up guide</a>, I was up and running in under an hour. I made a stupid mistake when copying my public key and had to rebuild my slice. But that&#8217;s the beauty of the cloud, just hit a button, start with a fresh install and go again.</p>
	<p>I am testing it out, as I have a dedicated server which costs too much for the small number of low traffic sites I maintain. After going through all the articles on getting the basics set up, I altered my /etc/hosts file on my desktop to point to the IP address of my new slice, updated the ServerAlias in the Apache vhosts file to include the &#8220;slice&#8221; domain name in my /etc/hosts file, and then finally enabled mod_rewite  (sudo a2enmod rewrite) so I could test out a site that was running Zend_Framework without having to actual point production traffic at it.</p>
	<p>I then set up <a href="http://articles.slicehost.com/tags/rsync">rysnc</a> and get some <a href="http://articles.slicehost.com/2008/7/10/mysql-different-levels-of-permissions">database</a> permission set up and tables copied over, and it was live. Talk about easy&#8230;.</p>
	<p>I looked at Amazon, and while it offers a lot of flexibility and they are developing more and more tools (instead of APIs), it just seemed like way to much work for my limited needs. Anyways, really impressed with Slicehost after just one day, we&#8217;ll see how it goes in the next week or so. This blog may be moving over next&#8230;
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.robertbolton.com/slicehost-vps/feed/</wfw:commentRSS>
	</item>
	</channel>
</rss>
