<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Dev Pages</title>
	<atom:link href="http://www.n8williams.com/devblog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.n8williams.com/devblog</link>
	<description>A knowledge base for simple (and beyond) web applications development</description>
	<lastBuildDate>Fri, 21 May 2010 12:30:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8216;Length&#8217; attribute or column name in database can clash with jQuery and javascript</title>
		<link>http://www.n8williams.com/devblog/javascript_and_ajax/length-attribute-or-column-name-in-database-can-clash-with-jquery-and-javascript</link>
		<comments>http://www.n8williams.com/devblog/javascript_and_ajax/length-attribute-or-column-name-in-database-can-clash-with-jquery-and-javascript#comments</comments>
		<pubDate>Thu, 13 May 2010 05:45:01 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Javascript and AJAX]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=276</guid>
		<description><![CDATA[In what was one of the worst bugs I have come across in a while, mainly my fault, I learned the hard way that using the name &#8216;length&#8217; for an object attribute may be a bad idea. Along the same lines as using &#8216;window&#8217; as an attribute name. These things tend to cause clashes in [...]]]></description>
			<content:encoded><![CDATA[<p>In what was one of the worst bugs I have come across in a while, mainly my fault, I learned the hard way that using the name &#8216;length&#8217; for an object attribute may be a bad idea. Along the same lines as using &#8216;window&#8217; as an attribute name. These things tend to cause clashes in framework and javascript libraries.</p>
<p>So more specifically with the yii framework, which uses jQuery to handle gridview filtering, I debugged the hell out of other people&#8217;s JavaScript code until I learned from line 59 on the jQuery core library that the each method on a jQuery object uses the length property of a jQuery and javascript object to iterate over its properties.</p>
<p>It goes as follows. Say I have a &#8216;windowdrape&#8217; table and object. This has a length and width, in inches, of how big the drape is. So I make a &#8216;length&#8217; column. The yii framework hands my model object off to javascript. So now in javascript I have a windowdrape object. So WindowDrape.length to jQuery is how many attributes the WindowDrape has. I expect it to be how long the window is in inches. So I set it to 98, and now all of a sudden jQuery will iterate the thing 98 times, and the attributes on WindowDrape are all messed up because of the bogus length attribute. </p>
<p>The lesson here, especially if you use the yii framework is Don&#8217;t name a column or model object attribute &#8216;length&#8217;. These things are also why I avoid using &#8216;name&#8217; or &#8216;window&#8217; etc. for attribute names. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/javascript_and_ajax/length-attribute-or-column-name-in-database-can-clash-with-jquery-and-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git &#8211;upload-pack using MSys and msysgit breaks path argument</title>
		<link>http://www.n8williams.com/devblog/git/git-upload-pack-using-msys-and-msysgit-breaks-path-argument</link>
		<comments>http://www.n8williams.com/devblog/git/git-upload-pack-using-msys-and-msysgit-breaks-path-argument#comments</comments>
		<pubDate>Fri, 07 May 2010 01:40:02 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=272</guid>
		<description><![CDATA[So if you need to explicitly set the upload-pack path on a git command using the msysgit shell, you&#8217;ll get a weird error. Apparently msys mucks up (in a lot of cases this is actually the desired behavior) paths. MSys alters the unix style path you entered to be windows style and prepends it with [...]]]></description>
			<content:encoded><![CDATA[<p>So if you need to explicitly set the upload-pack path on a git command using the msysgit shell, you&#8217;ll get a weird error. Apparently msys mucks up (in a lot of cases this is actually the desired behavior) paths. MSys alters the unix style path you entered to be windows style and prepends it with C:\PATHTOYOURGIT. This obviously confuses the server and causes a msysgit error on upload pack.</p>
<p>bash: C:/Git/PATHTOYOURUPLOADPACK/git-upload-pack: No such file or directory<br />
fatal: The remote end hung up unexpectedly</p>
<p>So to fix this (which was a pain in the ass to find!) you simply begin path arguments with an extra slash.</p>
<p>git clone &#8211;upload-pack /home/myuser/bin/git-upload-pack myuser@mydomain.com:/home/myuser/gitprojects/agitproject.git </p>
<p>becomes</p>
<p>git clone &#8211;upload-pack //home/myuser/bin/git-upload-pack myuser@mydomain.com:/home/myuser/gitprojects/agitproject.git </p>
<p>http://osdir.com/ml/msysgit/2010-03/msg00139.html</p>
<p>- If you want to specify a different location for &#8211;upload-pack, you have<br />
to start the absolute path with two slashes. Otherwise MSys will mangle<br />
the path. git and bash have serious problems with non-ASCII file names<br />
(Issue 80, 159).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/git/git-upload-pack-using-msys-and-msysgit-breaks-path-argument/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git permissions error: unable to create temporary sha1 filename ./objects/19: File exists</title>
		<link>http://www.n8williams.com/devblog/git/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists</link>
		<comments>http://www.n8williams.com/devblog/git/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists#comments</comments>
		<pubDate>Mon, 12 Apr 2010 17:52:07 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=250</guid>
		<description><![CDATA[I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see:
error: unable to create temporary sha1 filename ./objects/19: File exists
If you get this error (Where 19 is a number unique [...]]]></description>
			<content:encoded><![CDATA[<p>I had done a git rm of some swp files (I had forgotten to put *.swp in my .gitignore for this project) and after committing, I pushed to the remote origin and was suprised to see:</p>
<p>error: unable to create temporary sha1 filename ./objects/19: File exists</p>
<p>If you get this error (Where 19 is a number unique to your situation), then it is probably a permissions issue. On the remote server, make sure the remote bare repos, and ALL subfolders and files are owned by the appropriate (usually git) user. What is annoying is that somehow in the course of pretty normal git tasks, a non-git user was assigned ownership, or the git user was denied rights somehow. I forgot to check what the bad permissions were before I chowned and chgrped the files.</p>
<p>Once I logged in as an admin, changed to the git user&#8217;s home directory where all the remote bare repos exist, and issued &#8217;sudo chown -R git ./&#8217; and &#8217;sudo chgrp -R git ./&#8217; all was well. </p>
<p>I think the way to avoid this error is to make sure you are using the git user if you are pushing changes on the same server as the remote git repos.</p>
<p>See a more in depth discussion at <a href="http://kerneltrap.org/mailarchive/git/2008/11/28/4258264/thread" target="_blank">http://kerneltrap.org/mailarchive/git/2008/11/28/4258264/thread</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/git/git-permissions-error-unable-to-create-temporary-sha1-filename-objects19-file-exists/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using the mail() function in php with postfix on linux</title>
		<link>http://www.n8williams.com/devblog/php/using-the-mail-function-in-php-with-postfix-on-linux</link>
		<comments>http://www.n8williams.com/devblog/php/using-the-mail-function-in-php-with-postfix-on-linux#comments</comments>
		<pubDate>Mon, 12 Apr 2010 03:48:27 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=241</guid>
		<description><![CDATA[Note: If you have a one-off php script that just needs to shoot out emails, consider using the PEAR Mail class, or something similar. You can just pass it an SMTP server (e.g. that of your gmail account) with credentials (e.g. your gmail login) and it will work swell.  See http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm
Note 2: This was [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note:</strong> If you have a one-off php script that just needs to shoot out emails, consider using the PEAR Mail class, or something similar. You can just pass it an SMTP server (e.g. that of your gmail account) with credentials (e.g. your gmail login) and it will work swell.  See <a href="http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm" target="_blank">http://email.about.com/od/emailprogrammingtips/qt/PHP_Email_SMTP_Authentication.htm</a></p>
<p><strong>Note 2:</strong> This was done on an ubuntu server using postfix. This assumes you have postfix or sendmail installed on your server. On ubuntu you just do a &#8217;sudo apt-get install postfix&#8217; (or sendmail). To configure your MTA (Mail Transfer Agent e.g. Postfix, sendmail, etc.) to be secure, you&#8217;ll need to take additional steps, beyond the scope of this article. If you&#8217;re not concerned about the contents of you&#8217;re email being sniffed out, you&#8217;re probably ok if you&#8217;re just using outbound mail (a null client) with no smtp server listening for incoming traffic on port 25. I personally don&#8217;t care if a comment from someone using my website is emailed to me in plaintext (but maybe they would). See <a href="http://www.n8williams.com/devblog/linux/using-postfix-on-linux-for-sending-only-outgoing-messages">http://www.n8williams.com/devblog/linux/using-postfix-on-linux-for-sending-only-outgoing-messages</a> for postfix null client setup for just outgoing mail. You can do the same with sendmail, and even kill the sendmail daemons.</p>
<p>Open your php.ini file (ubuntu: /etc/php5/apache2/php.ini) and find the line that says:</p>
<p>; For Unix only.  You may supply arguments as well (default: &#8220;sendmail -t -i&#8221;).<br />
;sendmail_path =</p>
<p>Change this, by uncommenting out the second line, to:</p>
<p>; For Unix only.  You may supply arguments as well (default: &#8220;sendmail -t -i&#8221;).<br />
sendmail_path = /usr/sbin/sendmail -t -i</p>
<p>Where /usr/sbin/sendmail may be a different path for your linux distro. To find it you can issue &#8217;sudo find / -name sendmail&#8217; (note this does a recursive find starting at the root dir so it may take a little while, 7 seconds for me. Ctrl-C to cancel out of it when it finds it). the -t -i options have something to do with using email headers to determine who the email is from, and ignoring weird lines with a period. All I know is it has worked better with these flags. You can research them if you want.</p>
<p>Now here&#8217;s the crazy thing that I failed to get at first. If we&#8217;re using postfix, then why the hell are we dealing with sendmail_path? Well it turns out that sendmail_path is a common php.ini option, and the sendmail binary is commonly used by all sorts of things. So postfix, when installed, makes a sendmail binary called /usr/sbin/sendmail to be a sort-of backwards compatible sendmail interface for things that expect sendmail (which has been around for a while). So even though your calling upon a binary called sendmail, this is a postfix file. This confused me to no avail when I had installed sendmail first, than uninstalled it with the package m anager, and installed postfix. I was failing to understand why the uninstall didn&#8217;t remove the sendmail binary until I realized it was actually a postfix file after reading <a href="http://www.postfix.org/sendmail.1.html" target="_blank"> http://www.postfix.org/sendmail.1.html</a>.</p>
<p>Now restart apache/php and the mail function should work. Let&#8217;s hope. There&#8217;s a million cluttered google results about all the various reasons why mail() runs, and may hang, but no email gets sent. One key is reading your logs. Get familiar with the mail log. On ubuntu this is /var/log/mail.err, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/php/using-the-mail-function-in-php-with-postfix-on-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using postfix on linux for sending only outgoing messages</title>
		<link>http://www.n8williams.com/devblog/linux/using-postfix-on-linux-for-sending-only-outgoing-messages</link>
		<comments>http://www.n8williams.com/devblog/linux/using-postfix-on-linux-for-sending-only-outgoing-messages#comments</comments>
		<pubDate>Mon, 12 Apr 2010 03:36:45 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=226</guid>
		<description><![CDATA[Summary: What you want is to set up a null client. http://www.postfix.org/faq.html#null_client See my notes below for what constitutes an &#8217;smtp server entry&#8217;.
So for my local dev environments I&#8217;ve been in the habit of setting up php&#8217;s mail function to work by doing a &#8217;sudo apt-get install sendmail&#8217; and editing the php.ini to point the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong>: What you want is to set up a null client. <a href="http://www.postfix.org/faq.html#null_client" target="_blank">http://www.postfix.org/faq.html#null_client</a> See my notes below for what constitutes an &#8217;smtp server entry&#8217;.</p>
<p>So for my local dev environments I&#8217;ve been in the habit of setting up php&#8217;s mail function to work by doing a &#8217;sudo apt-get install sendmail&#8217; and editing the php.ini to point the sendmail_path to /usr/sbin/sendmail. (I&#8217;d recommend this procedure only if you&#8217;re working locally and don&#8217;t plan on opening port 25 to anything public, won&#8217;t want to mess with domain names, and won&#8217;t be dealing with mx records, etc.). </p>
<p>Well when I actually had to setup a server with a public domain, and needed emails to work efficiently from php with a qualified domain while worrying about port 25 being secure, I was in for some fun. For starters I&#8217;d recommend postfix over sendmail. Much easier to configure. Sendmail has many more config files, and you have to re-compile some of them after edits, etc. So once you have postfix installed, if you just want to send outgoing emails, then you can increase security and reduce overhead by making postfix not listen on the SMTP port. I wanted postfix as an smtp client only. With sendmail you can do this, and even kill all the daemons. With postfix you still need the daemon going, but when we&#8217;re done, nothing will be listening on port 25, smtp.</p>
<p>So what we are setting up is called a &#8216;null client&#8217;. You just have to modify /etc/postfix/main.cf and master/cf according to the instructions at <a href="http://www.postfix.org/faq.html#null_client" target="_blank">http://www.postfix.org/faq.html#null_client</a>. </p>
<p>The main thing that was unclear to me is what line(s) constitute a &#8216;SMTP server entry&#8217; in master.cf. After commenting out the line close to the top with &#8217;service&#8217; as &#8217;smtp&#8217; and &#8216;type&#8217; as &#8216;inet&#8217;, I figured this was enough, as &#8217;sudo lsof -i&#8217; indicated nothing was listening on port 25, or as smtp. I would leave the other smtp service entries alone, the ones with &#8216;type&#8217; as &#8216;unix&#8217;.</p>
<p>Then do &#8217;sudo postfix reload&#8217; and for good measure we may as well do &#8217;sudo /etc/init.d/postfix restart&#8217;, or the equivalent on your linux distro.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/linux/using-postfix-on-linux-for-sending-only-outgoing-messages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gem install rails on VirtualBox Ubuntu guest on a Windows 7 host times out</title>
		<link>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out</link>
		<comments>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out#comments</comments>
		<pubDate>Fri, 12 Mar 2010 22:45:12 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=220</guid>
		<description><![CDATA[Apparently if you have the network interface as NAT (the most standard one) then the gem installer has issues connecting to remote sources. Use a bridged network connection, or download all the gems you need separately for rails, and install each using the gem install GEMNAME &#8211;local command in the folder where you download the [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently if you have the network interface as NAT (the most standard one) then the gem installer has issues connecting to remote sources. Use a bridged network connection, or download all the gems you need separately for rails, and install each using the gem install GEMNAME &#8211;local command in the folder where you download the gems. (I couldn&#8217;t get the bridged connection to work either, so I just installed all the gems by downloading each gem separately. Sort of annoying, but once you know how to do it, and what the dependencies are (rails has sort of a lot, but not too bad), it is easy. Use rubygems.org and not rubyforge.org)</p>
<p>This is weird since other remote gems work fine. The link at the bottom discusses how this might be a bug or something. Very annoying though, getting to the point where you find that it isn&#8217;t a linux problem, but a virtualbox and rubygems thing.</p>
<p>To get to the nitty gritty you have to do sudo gem install -V &#8211;debug (for verbose debugging). </p>
<p>The first level of error, by using the -V verbose option will show<br />
Error fetching remote data: timed out (on some remote gem), and then eventually the non-verbose error:</p>
<p>ERROR: While executing gem &#8230; (Gem::RemoteFetcher::FetchError) timed out (http://rubygems.org/gems/rails-x.x.x.gem)</p>
<p>To get to the root of the problem, you use the &#8211;debug flag which will show</p>
<p>Exception `NameError&#8217; at YOURENV/command_manager.rb:161 &#8211; uninitialized constant<br />
Gem::Commands::InstallCommand<br />
Exception `Gem::LoadError&#8217; at YOURENV<br />
rubygems.rb:826 &#8211; Could not find RubyGem sources (> 0.0.1)<br />
Exception `Errno::ETIMEDOUT&#8217; at YOURENV/net/</p>
<p>See <a href="http://www.ruby-forum.com/topic/204146" target="_blank">http://www.ruby-forum.com/topic/204146</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/ruby-on-rails/gem-install-rails-on-virtualbox-ubuntu-guest-on-a-windows-7-host-times-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing newer version of rails on ubuntu 9.10 karmic koala</title>
		<link>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala</link>
		<comments>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala#comments</comments>
		<pubDate>Sat, 27 Feb 2010 23:22:01 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=209</guid>
		<description><![CDATA[I had a bunch of weird errors, like actionpack requires a certain version of rack, etc. when trying to use the gem install rails and other such commands.
I found it easier to remove any gems that were old, and then just download each gem dependency from rubyforge.org. Then I could download each gem, go to [...]]]></description>
			<content:encoded><![CDATA[<p>I had a bunch of weird errors, like actionpack requires a certain version of rack, etc. when trying to use the gem install rails and other such commands.</p>
<p>I found it easier to remove any gems that were old, and then just download each gem dependency from rubyforge.org. Then I could download each gem, go to that download folder in the command line, and run sudo gem install <em>GEMNAME </em>- -local, and make sure the versions I wanted for everything were correct</p>
<p>ruby extconf.rb install mysql<br />
extconf.rb:1:in `require&#8217;: no such file to load &#8212; mkmf (LoadError)<br />
        from extconf.rb:1</p>
<p>Make sure the package rubyXX-dev is installed. This will stop the mkmf errors.</p>
<p>ruby extconf.rb install mysql<br />
extconf.rb:1:in `require&#8217;: no such file to load &#8212; mkmf (LoadError)<br />
        from extconf.rb:1</p>
<p>When installing the mysql gem in ubuntu make sure you have the following 3 packages installed: build-essential, rubyXX-dev, and libmysqlclientXX-dev, where the XXs correspond to your version numbers. </p>
<p>If you want to read the log, in ubuntu 9.10 with ruby 1.8.7 and rails 2.3.4 it was in /var/lib/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/mkmf.log</p>
<p>Also be aware that 9.10 ubuntu&#8217;s default mysql sock appears to be /var/run/mysqld/mysqld.sock</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/ruby-on-rails/installing-newer-version-of-rails-on-ubuntu-9-10-karmic-koala/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails and Flex using rubyamf association errors</title>
		<link>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors</link>
		<comments>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:43:16 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=196</guid>
		<description><![CDATA[I&#8217;ll have to re-duplicate the exact error message on ruby&#8217;s side. From what I recall, this was obscured by a bunch of weird error messages that were deep in the codebase for rubyamf.
Basically, if your rails server barfs a bunch of errors when you try and load activerecord objects from an amf request, one cause [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll have to re-duplicate the exact error message on ruby&#8217;s side. From what I recall, this was obscured by a bunch of weird error messages that were deep in the codebase for rubyamf.</p>
<p>Basically, if your rails server barfs a bunch of errors when you try and load activerecord objects from an amf request, one cause of this can be the fact that you have associations setup in your rubyamf_config.rb file, and there are bad or missing foreign keys in the database for linking associated tables.</p>
<p>In the following example ruby barks when an account is loaded. Account has a location_id in the database to a location. If the location record with that id does not exist, ruby does not throw a nice error.</p>
<div class="text-box">
<pre>
<code>ClassMappings.register(:actionscript =&gt; 'Account', :ruby =&gt; 'Account', :type =&gt; 'active_record',
    :attributes =&gt; ["id", "location_id", "verified", "org_id", "login", "password", "email",  "name_title", "name_first","name_middle",
        "name_last","name_suffix","phone","phone_2","phone_3","last_login_at", "created_at", "updated_at", "business", "residential"],
    <span style="color:#CC6666">:associations =&gt; ["locations"]</span>)</code>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/flex/ruby-on-rails-and-flex-using-rubyamf-association-errors/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Vertical Overlapping of floating divs</title>
		<link>http://www.n8williams.com/devblog/css/css-vertical-overlapping-of-floating-divs</link>
		<comments>http://www.n8williams.com/devblog/css/css-vertical-overlapping-of-floating-divs#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:10:58 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[CSS and Stylesheeting]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=155</guid>
		<description><![CDATA[I thought this involved some trickiness. I needed to have a row of floating divs have the content underneath it pulled up over it, just a little bit, so that some body tabs appeared to the right of one of the floating images in the header.
After much testing and trial and error I figured out [...]]]></description>
			<content:encoded><![CDATA[<p>I thought this involved some trickiness. I needed to have a row of floating divs have the content underneath it pulled up over it, just a little bit, so that some body tabs appeared to the right of one of the floating images in the header.</p>
<p>After much testing and trial and error I figured out that the content below overlaps the content above depending on the dimensions of the div above it. The content below will STOP overlapping when it hits the image above UNLESS you <strong>make the height of the above div (that contains the image/content) to be smaller than the image/content itself</strong>. It appears by default, the height of the div containing the image is the same as the image (makes sense).</p>
<p>So the trickiness is in fooling the div below to overlap the div above, when the div below sees the above div as smaller in height than the image it contains.</p>
<p>I&#8217;ll post my html in the off-chance that someone can find and use this info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/css/css-vertical-overlapping-of-floating-divs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and MySQL setup on Mac OS X 10.5 Leopard</title>
		<link>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard</link>
		<comments>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard#comments</comments>
		<pubDate>Thu, 10 Sep 2009 23:45:45 +0000</pubDate>
		<dc:creator>Nate Admin</dc:creator>
				<category><![CDATA[General Dev]]></category>

		<guid isPermaLink="false">http://www.n8williams.com/devblog/?p=91</guid>
		<description><![CDATA[Full fledged open-source MAMP development environment with php, mysql, and apache on Mac OS X 10.5 Leopard
Goal: A complete php development environment using Mac OS X 10.5 Leopard&#8217;s out of the box apache2/php install, and an install of the latest mysql and eclipse software with all the necessary plugins for php debugging. ALL 64-BIT! 
Admittedly, [...]]]></description>
			<content:encoded><![CDATA[<h2>Full fledged open-source MAMP development environment with php, mysql, and apache on Mac OS X 10.5 Leopard</h2>
<p><strong>Goal: A complete php development environment using Mac OS X 10.5 Leopard&#8217;s out of the box apache2/php install, and an install of the latest mysql and eclipse software with all the necessary plugins for php debugging. ALL 64-BIT! </strong></p>
<p>Admittedly, it was a challenge to get a fully functioning php dev environment up based on Mac OS X 10.5 Leopard&#8217;s configuration. But I succeeded in not installing a separate apache/php 32-bit install, or bailing out to use a linux Virtual Box.</p>
<h2>Enabling PHP</h2>
<h3>PHP5</h3>
<p>This one was pretty easy. Just uncomment out the line</p>
<p>#LoadModule php5_module        libexec/apache2/libphp5.so</p>
<p>in the httpd.conf apache config (/etc/apache2/httpd.conf) so it includes the php5 module that comes with the OS.</p>
<p>Make sure your extension_dir in php.ini points to /usr/lib/php5/extensions/no-debug-non-zts-20060613/ or go nuts and do your own extension directory. </p>
<h3>Debugging 64-bit</h3>
<p>This was one of the trickier things. You need to get an X-Debug extension setup. Hopefully you can just use my 64-bit extension file, and put that in your extensions directory (/usr/lib/php5/extensions/no-debug-non-zts-20060613/). Then add the zend_extension directive to the php.ini, along with the X-Debug settings, pointing to your (local or remote) host. In your php.ini:</p>
<div class="text-box">
<pre>
(left bracket)xdebug(right bracket)
zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=natest.crimereports.com  ; if debugging on remote server, put client IP here
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
</pre>
</div>
<p><a title="xdebug extension" href="http://n8williams.com/misc/xdebug.so" target="_self">xbedug.so</a> (specific to 64-bit Mac OS X)</p>
<p>If that short version doesn&#8217;t work, you need to compile a 64-bit extension from the xdebug source, which was sort of tricky. You&#8217;ll need to get a compiler installed on your Mac OS if you haven&#8217;t got the right developer tools installed (XCode from the install disk or mac;s website), and then follow the instructions in this article.</p>
<p><a title="64-bit XDebug driver for php on Mac OS X 10.5" href="http://www.vividreflection.com/blog/installing-xdebug-on-macosx/" target="_blank">http://www.vividreflection.com/blog/installing-xdebug-on-macosx/</a><br />
<a title="64-bit XDebug driver for php on Mac OS X 10.5" href="http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105" target="_blank">http://www.designified.com/blog/article/60/compiling-installing-xdebug-for-php-525-entropych-build-on-os-x-105</a></p>
<h2>Installing MySQL</h2>
<p>Use the installer from MySQL&#8217;s site, and it goes pretty seamlessly. You may have to edit the php.ini to use the mysql server.</p>
<p>The tricky part of this is if you use a framework, or your code uses the pdo database interface. Again, you can try my 64-bit version, or compile your own pdo_mysql extension. Enable the extension in the php.ini by addin gthe line extension=pdo_mysql.so</p>
<p><a title="pdo_mysql extension" href="http://n8williams.com/misc/pdo_mysql.so" target="_self">pdo_mysql.so</a> (specific to 64-bit Mac OS X)</p>
<p><a title="pdo_mysql 64-bit for Mac OS X 10.5" href="http://www.hoboes.com/Mimsy/hacks/adding-pdo-mysql-mac-os-x-leopard-server/" target="_blank">http://www.hoboes.com/Mimsy/hacks/adding-pdo-mysql-mac-os-x-leopard-server/</a><br />
<a title="pdo_mysql issues" href="http://www.spiration.co.uk/post/1332/install%20PDO_MYSQL%20-%20mysql_config%20and%20header%20files%20problem" target="_blank">http://www.spiration.co.uk/post/1332/install%20PDO_MYSQL%20-%20mysql_config%20and%20header%20files%20problem</a></p>
<h2>Eclipse</h2>
<p>So there is a Cacao version that is 64-bit. I guess the difference here, as I&#8217;ve read online, is that the Carbon version is more stable, but also legacy and in the future will be deprecated soon.</p>
<p>I love using the update site to get plugins. That seemed to work best for PDT php, aptana, SVN (subclipse), and various editors, etc.</p>
<h2>Flex</h2>
<p>I sort of copped-out here when I learned the 64-bit version of eclipse doesn&#8217;t work well with Flex-Builder as an Eclipse plugin. I&#8217;m planning on installing the stand-alone version of flex builder, and using that separately (a little but resource wasteful, but far more convenient).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.n8williams.com/devblog/general_dev/php-and-mysql-setup-on-mac-os-x-leopard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
