<?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:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Stereo Interactive &amp; Design</title>
	
	<link>http://stereointeractive.com/blog</link>
	<description>Development Blog</description>
	<lastBuildDate>Sun, 18 Oct 2009 00:24:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</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/stereointeractive" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>The Secret Behind “SEO”</title>
		<link>http://stereointeractive.com/blog/2009/10/17/the-secret-behind-seo/</link>
		<comments>http://stereointeractive.com/blog/2009/10/17/the-secret-behind-seo/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 00:24:52 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=369</guid>
		<description><![CDATA[What is the secret to SEO?
&#8220;Make something great. Tell people about it. Do it again.&#8221;

from Spammers, Evildoers, and Opportunists by Derek Powazek:
The problem with SEO is that the good advice is obvious, the rest doesn’t work, and it’s poisoning the web. I’m going to tell you about the problems, and then tell you the one [...]]]></description>
			<content:encoded><![CDATA[<p>What is the secret to SEO?</p>
<blockquote><p><strong>&#8220;Make something great. Tell people about it. Do it again.&#8221;</strong>
</p></blockquote>
<p>from <em><a href="http://powazek.com/posts/2090">Spammers, Evildoers, and Opportunists</a></em> by Derek Powazek:</p>
<blockquote><p>The problem with SEO is that the good advice is obvious, the rest doesn’t work, and it’s poisoning the web. I’m going to tell you about the problems, and then tell you the one true way to generate traffic on the web, based on my own 14 years of hits and misses.
</p></blockquote>
<p>This is a great post, which I discovered through <a href="http://daringfireball.net/linked/2009/10/13/powazek-seo">daringfireball</a>. It&#8217;s worth a read, either if you manage a website and have wondered about what &#8220;SEO&#8221; can (or in this case, can&#8217;t) do for you, or if you are a web developer and you get clients asking how they can improve their search visibility.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/10/17/the-secret-behind-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 Icon Packs You Will Actually Use</title>
		<link>http://stereointeractive.com/blog/2009/10/17/6-icon-packs-you-will-actually-use/</link>
		<comments>http://stereointeractive.com/blog/2009/10/17/6-icon-packs-you-will-actually-use/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 22:20:49 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=367</guid>
		<description><![CDATA[You can never have too many good icons&#8230; 
6 Icon Packs You Will Actually Use.
]]></description>
			<content:encoded><![CDATA[<p>You can never have too many good icons&#8230; </p>
<p><a href='http://www.graphicrating.com/2009/10/11/6-icon-packs-you-will-actually-use/'>6 Icon Packs You Will Actually Use</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/10/17/6-icon-packs-you-will-actually-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony 1.3 Published Book…. Already?</title>
		<link>http://stereointeractive.com/blog/2009/10/09/symfony-1-3-published-book-already/</link>
		<comments>http://stereointeractive.com/blog/2009/10/09/symfony-1-3-published-book-already/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 21:29:18 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=347</guid>
		<description><![CDATA[

I just received a review copy of a new book published by Packt Publishing called &#8220;Symfony 1.3 Web Application Development&#8220;, available online. The book is written by Tim Bowler and Wojciech Bancer over at the UK based Agile Labs. It&#8217;s amazing that a book has been published for this new version of symfony even before [...]]]></description>
			<content:encoded><![CDATA[<div>
<img src="http://stereointeractive.com/blog/wp-content/uploads/2009/10/photo-150x150.jpg" alt="Symfony 1.3 Book Cover" title="Symfony 1.3 Book Cover" width="150" height="150" class="size-thumbnail wp-image-348" style="float:right; margin:.5em" /></p>
<p>I just received a review copy of a new book published by Packt Publishing called &#8220;<a href="http://www.packtpub.com/symfony-1-3-web-application-development/book">Symfony 1.3 Web Application Development</a>&#8220;, available online. The book is written by Tim Bowler and Wojciech Bancer over at the UK based Agile Labs. It&#8217;s amazing that a book has been published for this new version of symfony even before the 1.3.0ALPHA1 was released. </p>
<p>The book covers all of the basics, including the forms framework and the admin generator. The code examples use Propel rather than Doctrine. I&#8217;m looking forward to seeing how in depth they go into the forms framework; to me it seems to be the most confusing aspect about symfony overall.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/10/09/symfony-1-3-published-book-already/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony, Doctrine Upload File “validation failed”</title>
		<link>http://stereointeractive.com/blog/2009/10/04/symfony-doctrine-upload-file-validation-failed/</link>
		<comments>http://stereointeractive.com/blog/2009/10/04/symfony-doctrine-upload-file-validation-failed/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 05:19:49 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=335</guid>
		<description><![CDATA[After setting up a simple file upload using the symfony 1.2 forms class and a doctrine model, I hit this error right away:

500 &#124; Internal Server Error &#124; Doctrine_Validator_Exception
 1 field had validation error:
 * 1 validator failed on file &#40;type&#41;

The short solution: when using a doctrine form class and $form->save(), set the path option [...]]]></description>
			<content:encoded><![CDATA[<p>After setting up a simple file upload using the symfony 1.2 forms class and a doctrine model, I hit this error right away:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="nu0">500</span> <span class="sy0">|</span> Internal Server Error <span class="sy0">|</span> Doctrine_Validator_Exception
 <span class="nu0">1</span> field had validation error:
 <span class="sy0">*</span> <span class="nu0">1</span> validator failed on <span class="kw2">file</span> <span class="br0">&#40;</span><span class="kw3">type</span><span class="br0">&#41;</span></pre></div></div>

<p><strong>The short solution: when using a doctrine form class and $form->save(), set the path option in your sfValidatorFile validator and do not attempt to save/set the file column yourself.</strong> If you are curious why this is, continue reading.<span id="more-335"></span></p>
<p>What was particularly strange about this error is that the &#8220;file&#8221; column in my model was defined as a string, and I was certain I was setting this column by hand to the file name (a string) of the uploaded file. Hmm&#8230; this shouldn&#8217;t trigger an error, should it? This following is what <strong>did not work</strong>. I used the documentation for sfValidatorFile() found in the<a href="http://www.symfony-project.org/forms/1_2/en/02-Form-Validation#chapter_02_file_upload"> symfony Forms book</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="co1">// my form</span>
<span class="kw2">class</span> ArtistForm <span class="kw2">extends</span> BaseArtistForm
<span class="br0">&#123;</span>
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'file'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInputFile<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">validatorSchema</span><span class="br0">&#91;</span><span class="st_h">'file'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfValidatorFile<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span>
      <span class="st_h">'required'</span> <span class="sy0">=&gt;</span> <span class="kw4">false</span><span class="sy0">,</span> <span class="st_h">'mime_types'</span> <span class="sy0">=&gt;</span> <span class="st_h">'web_images'</span>
    <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="co1">// my action ***did not work***</span>
<span class="kw2">public</span> <span class="kw2">function</span> executeForm<span class="br0">&#40;</span>sfWebRequest <span class="re0">$request</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span> <span class="sy0">=</span> <span class="kw2">new</span> ArtistForm<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">isMethod</span><span class="br0">&#40;</span><span class="st_h">'post'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
      <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">bind</span><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getParameter</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getFiles</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">isValid</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
      <span class="br0">&#123;</span>
        <span class="re0">$file</span> <span class="sy0">=</span> <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">getValue</span><span class="br0">&#40;</span><span class="st_h">'file'</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$file</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
          <span class="re0">$filename</span> <span class="sy0">=</span> <span class="kw3">sha1</span><span class="br0">&#40;</span><span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getOriginalName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
          <span class="re0">$extension</span> <span class="sy0">=</span> <span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getExtension</span><span class="br0">&#40;</span><span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">getOriginalExtension</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
          <span class="re0">$file</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="br0">&#40;</span>sfConfig<span class="sy0">::</span><span class="me2">get</span><span class="br0">&#40;</span><span class="st_h">'sf_upload_dir'</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st_h">'/'</span><span class="sy0">.</span><span class="re0">$filename</span><span class="sy0">.</span><span class="re0">$extension</span><span class="br0">&#41;</span><span class="sy0">;</span>          
          <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">getObject</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">-&gt;</span><span class="me1">setFile</span><span class="br0">&#40;</span><span class="re0">$filename</span><span class="sy0">.</span><span class="re0">$extension</span><span class="br0">&#41;</span><span class="sy0">;</span>
        <span class="br0">&#125;</span>
&nbsp;
        <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>    
  <span class="br0">&#125;</span></pre></div></div>

<p>Anytime I&#8217;d try to upload a file, I&#8217;d get the dreaded &#8220;Doctrine_Validator_Exception&#8221;, &#8220;validator failed on file (type)&#8221; message. After some serious googling, I came up with a few links (listed at the bottom of this post) that eventually led me to the solution. The issues boils down to this:</p>
<ul>
<li>When using the sfValidatorFile widget in your form, retrieving that value from your form returns an sfValidatedFile object</li>
<li>Doctrine forms will automatically try to process and save uploaded files, so you do not need to do this manually in your action if you call $form->save() and your form contains an instance of sfValidatorFile</li>
<li>The automatic save mechanism in your doctrine form <strong>will fail</strong> if you do not define a path in your sfValidatorFile validator. This is because if no path is defined in your validator, <strong>the validator returns an instance of sfValidatedFile</strong> and calling $form->save() will result in trying to update your doctrine object with this sfValidatorFile instance, resulting in an error.</li>
<li>If a path is defined in your sfValidatorFile validator, the bound form value for your file input field is set to the full path to saved file rather than an sfValidatedFile instance, allowing your doctrine object to be saved.</li>
</ul>
<p>Now, with a deeper understanding of how this is all put together, we can update our action:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span class="co1">// doctrine form class</span>
<span class="kw2">class</span> ArtistForm <span class="kw2">extends</span> BaseArtistForm
<span class="br0">&#123;</span>
  <span class="kw2">public</span> <span class="kw2">function</span> configure<span class="br0">&#40;</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">widgetSchema</span><span class="br0">&#91;</span><span class="st_h">'photo'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfWidgetFormInputFile<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">validatorSchema</span><span class="br0">&#91;</span><span class="st_h">'photo'</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">new</span> sfValidatorFile<span class="br0">&#40;</span><span class="kw3">array</span><span class="br0">&#40;</span>
      <span class="st_h">'required'</span> <span class="sy0">=&gt;</span> <span class="kw4">false</span><span class="sy0">,</span> <span class="st_h">'mime_types'</span> <span class="sy0">=&gt;</span> <span class="st_h">'web_images'</span><span class="sy0">,</span>
      <span class="st_h">'path'</span> <span class="sy0">=&gt;</span> sfConfig<span class="sy0">::</span><span class="me2">get</span><span class="br0">&#40;</span><span class="st_h">'sf_upload_dir'</span><span class="br0">&#41;</span>
    <span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
  <span class="br0">&#125;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="co1">// the action</span>
  <span class="kw2">public</span> <span class="kw2">function</span> executeForm<span class="br0">&#40;</span>sfWebRequest <span class="re0">$request</span><span class="br0">&#41;</span>
  <span class="br0">&#123;</span>
    <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span> <span class="sy0">=</span> <span class="kw2">new</span> ArtistForm<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
    <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">isMethod</span><span class="br0">&#40;</span><span class="st_h">'post'</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
      <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">bind</span><span class="br0">&#40;</span><span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getParameter</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="sy0">,</span> <span class="re0">$request</span><span class="sy0">-&gt;</span><span class="me1">getFiles</span><span class="br0">&#40;</span><span class="st_h">'artist'</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">isValid</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>
      <span class="br0">&#123;</span>
        <span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">form</span><span class="sy0">-&gt;</span><span class="me1">save</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
      <span class="br0">&#125;</span>
    <span class="br0">&#125;</span>    
  <span class="br0">&#125;</span></pre></div></div>

<p>More about this issue in the forums and mailing list:</p>
<ul>
<li><a href="http://forum.symfony-project.org/index.php/m/74831/">http://forum.symfony-project.org/index.php/m/74831/</a></li>
<li><a href="http://groups.google.com/group/symfony-users/browse_thread/thread/668a44a52a775938/3d55c8bb40290dbe?show_docid=3d55c8bb40290dbe">http://groups.google.com/group/symfony-users/browse_thread/thread/668a44a52a775938/3d55c8bb40290dbe?show_docid=3d55c8bb40290dbe</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/10/04/symfony-doctrine-upload-file-validation-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Site Launched: Michigan Law Review</title>
		<link>http://stereointeractive.com/blog/2009/09/28/new-site-launched-michigan-law-review/</link>
		<comments>http://stereointeractive.com/blog/2009/09/28/new-site-launched-michigan-law-review/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 17:41:02 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=329</guid>
		<description><![CDATA[Over the weekend we launched a new website for the Michigan Law Review. This site uses a custom publishing platform we built using Symfony. We are also using cufon to generate titles using a custom font. I think it turned out great. 

]]></description>
			<content:encoded><![CDATA[<p>Over the weekend we launched a new website for the Michigan Law Review. This site uses a custom publishing platform we built using Symfony. We are also using <a href="http://wiki.github.com/sorccu/cufon/about">cufon</a> to generate titles using a custom font. I think it turned out great. <span id="more-329"></span></p>
<p><a href="http://stereointeractive.com/blog/2009/09/28/new-site-launched-michigan-law-review/michigan-law-review/" rel="attachment wp-att-330"><img src="http://stereointeractive.com/blog/wp-content/uploads/2009/09/Michigan-Law-Review.png" alt="Michigan Law Review" title="Michigan Law Review" width="399" height="457" class="alignnone size-full wp-image-330" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/09/28/new-site-launched-michigan-law-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Duct Tape Programmer – Joel on Software</title>
		<link>http://stereointeractive.com/blog/2009/09/25/the-duct-tape-programmer-joel-on-software/</link>
		<comments>http://stereointeractive.com/blog/2009/09/25/the-duct-tape-programmer-joel-on-software/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 15:59:05 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=317</guid>
		<description><![CDATA[Good point.
Zawinski didn’t do many unit tests. They “sound great in principle. Given a leisurely development pace, that’s certainly the way to go. But when you’re looking at, ‘We’ve got to go from zero to done in six weeks,’ well, I can’t do that unless I cut something out. And what I’m going to cut [...]]]></description>
			<content:encoded><![CDATA[<p>Good point.</p>
<blockquote><p>Zawinski didn’t do many unit tests. They “sound great in principle. Given a leisurely development pace, that’s certainly the way to go. But when you’re looking at, ‘We’ve got to go from zero to done in six weeks,’ well, I can’t do that unless I cut something out. And what I’m going to cut out is the stuff that’s not absolutely critical. And unit tests are not critical. If there’s no unit test the customer isn’t going to complain about that.”</p>
</blockquote>
<p>via <a href='http://www.joelonsoftware.com/items/2009/09/23.html'>The Duct Tape Programmer &#8211; Joel on Software</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/09/25/the-duct-tape-programmer-joel-on-software/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Entropy php5 with APC …</title>
		<link>http://stereointeractive.com/blog/2009/08/24/entropy-php5-with-apc/</link>
		<comments>http://stereointeractive.com/blog/2009/08/24/entropy-php5-with-apc/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 18:04:25 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=315</guid>
		<description><![CDATA[I decided to finally install some sort of PHP accelerator on my development machine to see if I could speed things up a bit. 
My first attempt was to use PECL to install APC, but that didn&#8217;t work, so I had to rely on these instructions. They worked perfectly with my setup: OS X 10.5.8, [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to finally install some sort of PHP accelerator on my development machine to see if I could speed things up a bit. </p>
<p>My first attempt was to use PECL to install APC, but that didn&#8217;t work, so I had to rely on these instructions. They worked perfectly with my setup: OS X 10.5.8, entropy PHP Version 5.2.9 (release 7) running x86_64.</p>
<p><a href='http://discussions.apple.com/thread.jspa?messageID=9947593'>Apple &#8211; Support &#8211; Discussions &#8211; Entropy php5 with GD support and APC &#8230;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/24/entropy-php5-with-apc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Speedup: Profile your symfony app using Xdebug – Web Mozarts</title>
		<link>http://stereointeractive.com/blog/2009/08/24/speedup-profile-your-symfony-app-using-xdebug-web-mozarts/</link>
		<comments>http://stereointeractive.com/blog/2009/08/24/speedup-profile-your-symfony-app-using-xdebug-web-mozarts/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 16:28:10 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=313</guid>
		<description><![CDATA[Speedup: Profile your symfony app using Xdebug &#8211; Web Mozarts.
Haven&#8217;t tried this but hope to, soon!
]]></description>
			<content:encoded><![CDATA[<p><a href='http://webmozarts.com/2009/05/01/speedup-performance-profiling-for-your-symfony-app/'>Speedup: Profile your symfony app using Xdebug &#8211; Web Mozarts</a>.</p>
<p>Haven&#8217;t tried this but hope to, soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/24/speedup-profile-your-symfony-app-using-xdebug-web-mozarts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a new developer started on an existing symfony project</title>
		<link>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/</link>
		<comments>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 17:24:20 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=305</guid>
		<description><![CDATA[Here is the basic process we use to get a new developer started on a symfony project. This flow assumes you already have created your symfony project and it checked into an svn repository somewhere, and that the developer is on a mac. 
1. Checkout code from SVN into your ~/Sites folder. From the command [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the basic process we use to get a new developer started on a symfony project. This flow assumes you already have created your symfony project and it checked into an svn repository somewhere, and that the developer is on a mac. <span id="more-305"></span></p>
<p>1. Checkout code from SVN into your ~/Sites folder. From the command line do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="kw2">svn</span> <span class="kw2">co</span> <span class="br0">&#91;</span>path to repository<span class="br0">&#93;</span> ~<span class="sy0">/</span>Sites<span class="sy0">/</span><span class="br0">&#91;</span>projectname<span class="br0">&#93;</span> <span class="re5">--username</span> <span class="br0">&#91;</span>username<span class="br0">&#93;</span></pre></div></div>

<p>After the checkout, go into your new [projectname] directory and do a fix permissions:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span class="sy0">/</span>symfony fix-perms</pre></div></div>

<p>2. Create a new virtual host in apache. You can skip this step but I find it makes things easier. My entry in my apache .conf file (on my mac its located at /etc/apache2/users/[username].conf where [username] is the username on my mac) looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span class="sy0">&lt;</span>VirtualHost <span class="sy0">*</span>:<span class="nu0">80</span><span class="sy0">&gt;</span>
	ServerName <span class="br0">&#91;</span>projectname<span class="br0">&#93;</span>.local
	DocumentRoot <span class="sy0">/</span>Users<span class="sy0">/</span><span class="br0">&#91;</span>myusername<span class="br0">&#93;</span><span class="sy0">/</span>Sites<span class="sy0">/</span><span class="br0">&#91;</span>projectname<span class="br0">&#93;</span><span class="sy0">/</span>web
<span class="sy0">&lt;/</span>VirtualHost<span class="sy0">&gt;</span></pre></div></div>

<p>I also have add this new domain to my local hosts file at /etc/hosts:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1   <span class="br0">&#91;</span>projectname<span class="br0">&#93;</span>.local</pre></div></div>

<p>then i restart my webserver with a &#8220;sudo apachectl graceful&#8221;.</p>
<p>3. set up your local database. On my mac I use Sequel Pro to create the database. I run a..</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span class="sy0">/</span>symfony propel-build-all</pre></div></div>

<p>..to regenerate the sql and base model classes. Often I don&#8217;t like to commit auto-generated code to svn but rather just the source files from which the new code is generated (you can read the side bar &#8220;Best Practice: Checkin all the canonical stuff, and nothing else&#8221; with one view on this at http://www.ericsink.com/scm/scm_repositories.html).</p>
<p>Once that is done, normally I would insert the db schema into my new database, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root <span class="br0">&#91;</span>dbname<span class="br0">&#93;</span> <span class="sy0">&lt;</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>lib.model.schema.sql</pre></div></div>

<p>&#8230; but sometimes I want to use a lot of the same basic data from before, so I insert database dump that has actual content:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span class="re5">-u</span> root <span class="br0">&#91;</span>dbname<span class="br0">&#93;</span> <span class="sy0">&lt;</span> data<span class="sy0">/</span>sql<span class="sy0">/</span>latest.sql</pre></div></div>

<p>4. configure the symfony project to use your new db. You&#8217;ll have to copy the config/databases.yml-dist to database.yml and add your own settings there. The databases.yml file is ignored in our repository, so that way the devs can keep different local configuration settings for our dev environment without having to create lots of different symfony environments (usually I keep them to just dev, stage, production) in the project.</p>
<p>5. load up http://[projectname].local/frontend_dev.php to see if things are working!</p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/20/getting-a-new-developer-started-on-an-existing-symfony-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>http_build_query</title>
		<link>http://stereointeractive.com/blog/2009/08/17/http_build_query/</link>
		<comments>http://stereointeractive.com/blog/2009/08/17/http_build_query/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 05:03:06 +0000</pubDate>
		<dc:creator>Scott Meves</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://stereointeractive.com/blog/?p=301</guid>
		<description><![CDATA[I can never remember the name of this function. I always google and search the php docs for things like &#8216;php query params&#8217;, &#8216;php url parameters&#8217;, &#8216;php query string from array&#8217;, &#8216;php http query params&#8217;, and I even saw &#8220;php array to post string&#8221; and for some reason this page just never comes up. Yes, [...]]]></description>
			<content:encoded><![CDATA[<p>I can never remember the name of this function. I always google and search the php docs for things like &#8216;php query params&#8217;, &#8216;php url parameters&#8217;, &#8216;php query string from array&#8217;, &#8216;php http query params&#8217;, and I even saw &#8220;php array to post string&#8221; and for some reason this page just never comes up. Yes, this post is a selfish way for me to find this next year when I search my blog for this post!</p>
<p><a href="http://www.php.net/manual/en/function.http-build-query.php">http://www.php.net/manual/en/function.http-build-query.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://stereointeractive.com/blog/2009/08/17/http_build_query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
