<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://www.boringguys.com/wp-atom.php">
	<title type="text">boringguys.com » PHP</title>
	<subtitle type="text">php, perl, mysql, xml, and other business and application development stuff that keeps boring guys like Rich Zygler occupied</subtitle>

	<updated>2009-07-08T10:14:17Z</updated>
	<generator uri="http://wordpress.org/" version="2.6.2">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://www.boringguys.com" />
	<id>http://www.boringguys.com/feed/atom/</id>
	

			<link rel="self" href="http://feeds.feedburner.com/boringguys-php" type="application/atom+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fboringguys-php" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fboringguys-php" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fboringguys-php" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/boringguys-php" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fboringguys-php" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fboringguys-php" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fboringguys-php" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Development Environment layout using Linux, Apache, PHP, and Subversion]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/OaMdKNm_BHU/" />
		<id>http://www.boringguys.com/?p=126</id>
		<updated>2009-07-08T10:13:49Z</updated>
		<published>2008-12-15T10:57:26Z</published>
		<category scheme="http://www.boringguys.com" term="Apache" /><category scheme="http://www.boringguys.com" term="LAMP" /><category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Programming" /><category scheme="http://www.boringguys.com" term="Subversion" /><category scheme="http://www.boringguys.com" term="linux" />		<summary type="html"><![CDATA[Some of the age old questions I face lately are:

What&#8217;s for dinner?


Should I accept that friend request on Facebook for the friend of a friend of a friend that I knew 15 years ago?
What&#8217;s the best development and test environment layouts for PHP using Apache as a web server with Subversion for version control for [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/12/15/development-environment-layout-using-linux-apache-php-and-subversion/"><![CDATA[<p>Some of the age old questions I face lately are:</p>
<ul>
<li>What&#8217;s for dinner?</li>
</ul>
<ul>
<li>Should I accept that friend request on Facebook for the friend of a friend of a friend that I knew 15 years ago?</li>
<li>What&#8217;s the best development and test environment layouts for PHP using Apache as a web server with Subversion for version control for multiple developers?</li>
</ul>
<p>Some of you may be asking yourselves the same questions.  The choice of dinner is a personal one.  I won&#8217;t go into that except to say that everyone loves a good burrito.  Spicy!  And you probably don&#8217;t care about my take on Facebook etiquette since your friends list probably dwarfs mine.</p>
<p>But I do have some definite thoughts on the layout of development environments.  And I find that there&#8217;s a huge lack of information about this on the interweb, so here you go.</p>
<p>We use Linux, Apache, PHP, and subversion in our development environment and so these instructions will be biased towards these topics but I think you can apply this method using various other technologies.</p>
<p>I like to give each developer their own development web site and development database.  I find it&#8217;s easier for everyone to have their own individual sandbox to play in.  We give them each their own domain using their initials, something like <strong>rzdev.domain.com</strong> for me and <strong>vbdev.domain.com</strong> for another developer, Vinny Bag-o-Donuts.  We set the Apache directories up on the Linux dev box in a similar fashion:</p>
<p><strong>/var/www/rzdev.domain.com/<br />
/var/www/vbdev.domain.com/</strong></p>
<p>This has a few benefits.  If I need to show Vinny something with my site development, I can just send him the link to <strong>http://rzdev.domain.com/broken-page</strong>.  I can make changes to code, even major infrastructure code and not break anything for the other developers.  We do the same thing with the databases, prefacing them with our initials.</p>
<p>Now, since our dev boxes use Linux, we set up Samba for sharing on these web directories.  This means that all the devs can edit files and use source code management on the Linux server itself or on their Windows machines (we use either Eclipse or Zend Studio and create projects on the shares, that&#8217;s a whole different posting!).</p>
<p>This dev site layout is closely linked to the way we use Subversion for version control.  When we start a new site or application, if we can split out the development evenly enough, we&#8217;ll just have everyone work from the trunk version of the code, with each developer working on their own little section. Each developer puts the trunk in their Apache dir and we edit the Apache configs to reflect this:</p>
<p><strong>/var/www/rzdev.domain.com/trunk/<br />
/var/www/vbdev.domain.com/trunk/</strong></p>
<p>The root of the dev sites typically look like this:</p>
<p><strong>/var/www/rzdev.domain.com/trunk/docs</strong> ( your Apache document root )<br />
<strong>/var/www/rzdev.domain.com/trunk/lib </strong> ( non-public PHP library code )</p>
<p>When we commit code changes in Subversion, we have a hook that updates our main development site here:</p>
<p><strong>/var/www/dev.domain.com/trunk</strong></p>
<p>Again, that site can be seen on the web at http://dev.domain.com/  This way, we can do integration testing on our code to make sure our new code doesn&#8217;t break code from someone else within the dev site.</p>
<p>Now, the important thing here is that the Quality Assurance (QA) and Testing people ( if you&#8217;re lucky enough to have them ), don&#8217;t use any of these previously mentioned sites for their testing.  Why not?  Well, because if they&#8217;re doing a good job and are therefore sufficiently anal, they&#8217;re going to complain when code is changing on the site they&#8217;re looking at.</p>
<p>So we give them their own test site and database that&#8217;s viewed on the web at <strong>http://test.domain.com/</strong> and setup in apache at:</p>
<p><strong>/var/www/test.domain.com/trunk/docs</strong><br />
<strong>/var/www/test.domain.com/trunk/lib</strong></p>
<p>The developers will meet and create the list of files and database changes that get moved over to the test site.  How the actual moving is done doesn&#8217;t really matter.  If you have the time and energy to set up some Ant or Phing tasks, that works great.  But copying/rsyncing files and running some SQL on the test database works just as well.  The most important part is that the developers meet to decide which part can go to test.  Otherwise, you could have code going to test and eventually production that might not be fully vetted.</p>
<p>When QA finds bugs in <strong>test.domain.com</strong>, they can send them to the developers.  The developers can instantly start working on fixing the bugs in their own dev space at <strong>rzdev.domain.com</strong> and not affect the other developers or the ongoing testing of the application.  Pretty nice right?</p>
<p>Advantages of this approach</p>
<ul>
<li>Uses source code management</li>
<li>Developers can unit test their own code</li>
<li>Developers can do integration testing between each other&#8217;s code</li>
<li>Developer A typically doesn&#8217;t destroy code or data that developer B is using</li>
<li>Developers don&#8217;t destroy code or data that QA/testing is looking at</li>
<li>Developers can both edit files and use source code management in either Linux or Windows environment</li>
<li>Very scalable.  Adding new developers into the mix is as simple as adding their respective sub domains and databases (of course, this can also be viewed as a disadvantage, see below)</li>
<li>Less bugs make it to production</li>
</ul>
<p>Disadvantages</p>
<ul>
<li>Lots of sysadmin overhead initially and with each subsequent domain added.  You have to set up all those developer sites, rzdev, vbdev, etc.  Same overhead when using branching within subversion.  Plus, you have to setup all those databases and setup the config code to connect to the appropriate database for each developer domain.</li>
<li>Lots of file space for all the sites and databases.</li>
<li>Confusing for lone wolf and gunslinger developers who are used to overwriting production or each other&#8217;s development code (too bad for them!)</li>
</ul>
<p>So what do you think?  How do you setup YOUR PHP development environment?</p>
<p>..</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=126&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_126" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/12/15/development-environment-layout-using-linux-apache-php-and-subversion/#comments" thr:count="15" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/12/15/development-environment-layout-using-linux-apache-php-and-subversion/feed/atom/" thr:count="15" />
		<thr:total>15</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/12/15/development-environment-layout-using-linux-apache-php-and-subversion/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Mysql and PHP help Obama become President of the United States]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/k9GbK8dYqPE/" />
		<id>http://www.boringguys.com/?p=120</id>
		<updated>2009-07-08T10:14:17Z</updated>
		<published>2008-11-05T10:27:25Z</published>
		<category scheme="http://www.boringguys.com" term=".NET" /><category scheme="http://www.boringguys.com" term="MySQL" /><category scheme="http://www.boringguys.com" term="PHP" />		<summary type="html"><![CDATA[We have our answer to my earlier question about technology used by Obama and McCain.  One small step for LAMP, one giant leap for LAMP-kind.
Share this via del.icio.us, digg, email, etc.
]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/11/05/mysql-and-php-help-obama-become-president-of-the-united-states/"><![CDATA[<p>We have our answer to my earlier question about <a href="http://www.boringguys.com/2008/06/06/obama-and-mccain-website-technology/">technology used by Obama and McCain</a>.  One small step for LAMP, one giant leap for LAMP-kind.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=120&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_120" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/11/05/mysql-and-php-help-obama-become-president-of-the-united-states/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/11/05/mysql-and-php-help-obama-become-president-of-the-united-states/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/11/05/mysql-and-php-help-obama-become-president-of-the-united-states/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Obama and McCain website technology]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/bDhudaFhXP4/" />
		<id>http://www.boringguys.com/2008/06/06/obama-and-mccain-website-technology/</id>
		<updated>2008-08-02T12:53:59Z</updated>
		<published>2008-06-06T17:01:52Z</published>
		<category scheme="http://www.boringguys.com" term=".NET" /><category scheme="http://www.boringguys.com" term="PHP" />		<summary type="html"><![CDATA[Hey all, I just realized that johnmccain.com is running MS Windows and .NET while barackobama.com is running LAMP with PHP.  May the best tech, errr, candidate win.
Also, Obama needs a PHP contractor in Boston, Ma.
.
Share this via del.icio.us, digg, email, etc.
]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/06/06/obama-and-mccain-website-technology/"><![CDATA[<p>Hey all, I just realized that <a href="http://www.johnmccain.com/">johnmccain.com</a> is running MS Windows and .NET while <a href="http://www.barackobama.com/index.php">barackobama.com</a> is running LAMP with PHP.  May the best tech, errr, candidate win.</p>
<p>Also, <a href="http://my.barackobama.com/page/s/techinterest">Obama needs a PHP contractor in Boston, Ma</a>.</p>
<p>.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=113&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_113" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/06/06/obama-and-mccain-website-technology/#comments" thr:count="6" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/06/06/obama-and-mccain-website-technology/feed/atom/" thr:count="6" />
		<thr:total>6</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/06/06/obama-and-mccain-website-technology/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Beware the Lone Wolf PHP Developer]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/o9H3T3gExvs/" />
		<id>http://www.boringguys.com/2008/05/20/beware-the-lone-wolf-php-developer/</id>
		<updated>2008-08-02T12:54:08Z</updated>
		<published>2008-05-20T09:46:57Z</published>
		<category scheme="http://www.boringguys.com" term="Business" /><category scheme="http://www.boringguys.com" term="Jobs" /><category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Programming" />		<summary type="html"><![CDATA[With all the posts on interviewing PHP candidates popping up lately, I thought I&#8217;d post this draft that I&#8217;ve been sitting on for awhile that&#8217;s related to new jobs and interviewing candidates.
I&#8217;ve run into the Lone Wolf PHP Developer at several places I have done work.  Sometimes, I&#8217;ve had to work side-by-side with the [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/05/20/beware-the-lone-wolf-php-developer/"><![CDATA[<p>With all the posts on <a href="http://www.phpcult.com/blog/frankly-my-dear-i-dont-give-a-damn-interviewing-techniques-for-the-rest-of-us/">interviewing PHP candidates</a> popping up lately, I thought I&#8217;d post this draft that I&#8217;ve been sitting on for awhile that&#8217;s related to new jobs and interviewing candidates.</p>
<p>I&#8217;ve run into the Lone Wolf PHP Developer at several places I have done work.  Sometimes, I&#8217;ve had to work side-by-side with the Lone Wolf.  Other times, I&#8217;ve replaced the Lone Wolf who had moved on to different hunting grounds.  Still other times I&#8217;ve had to hire people and had to choose between a Lone Wolf and several other candidates.</p>
<p>Just who is this Lone Wolf and why should we fear them so much?  Here are some telltale signs of the Lone Wolf PHP Developer:</p>
<ol>
<li>The Lone Wolf doesn&#8217;t understand how to work in a team of developers. They typically don&#8217;t even understand what benefits that would create. They do all development on their own, listening to very little input from qualified sources.</li>
<li>The Lone Wolf got to page 141 on Enter-A-Beginner-PHP-Book-Title-Here and no further.  Objects?  They&#8217;ve never heard of them.  They must not need them.</li>
<li>The Lone Wolf re-invents the wheel for every project and doesn&#8217;t use standard tools and practices.</li>
<li>The Lone Wolf eats their young.  OK, I made that one up.  Frankly, how could a Lone Wolf have young anyway?</li>
<li>The Lone Wolf is perfectly satisfied with doing programming work on production servers and using FTP to deploy their code.  It never occurs to them that they should strive to create development and test environments.  It never occurs to them that deployment via FTP doesn&#8217;t scale higher then one developer.</li>
<li>The Lone Wolf doesn&#8217;t know what the letters SCM, CVS, or SVN are, or how to use them in their daily work.</li>
<li>The Lone Wolf never reads my blog or any other blogs on programming.  The Lone Wolf may not know what a blog is.</li>
<li>The Lone Wolf says crazy things like &#8220;MySQL can&#8217;t do transactions&#8221; and somehow gets management to believe them.</li>
<li>The Lone Wolf was initially adored by management because they launched a lot of code live during their short stay.  Too bad all that code is buggy and completely un-maintainable moving forward.  Management doesn&#8217;t like that.</li>
<li>The Lone Wolf whips up incredibly stupid and unnecessarily complex solutions like template systems in which the templates are stored in a database instead of the file system/memory/cache.  They shun using tried and true templating methods like PHP files, XSLT, or at the very least, Smarty. (see also: reinventing the wheel)</li>
<li>The Lone Wolf names variables after themselves that mean nothing to anyone else (ex, $lonewolfFlag )</li>
<li>And worst of all… The Lone Wolf PHP Developer fails to realize that there are other developers out there in the business world, trying to earn a living just like they are.  By failing to conform to development standards that have been proven and tested, they make everyone&#8217;s job more difficult.</li>
</ol>
<p>Now, I personally have run into this Lone Wolf scenario with other programming languages as well.  But I think because it is so simple to work with PHP without much formal training that it lends itself to this problem much more readily then other languages.  The blessing and curse of PHP is that it is the new VB 6.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=112&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_112" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/05/20/beware-the-lone-wolf-php-developer/#comments" thr:count="23" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/05/20/beware-the-lone-wolf-php-developer/feed/atom/" thr:count="23" />
		<thr:total>23</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/05/20/beware-the-lone-wolf-php-developer/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[PHP Developer Jobs are the Hottest EVER!!!]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/Nczt4Uf1kqQ/" />
		<id>http://www.boringguys.com/2008/05/13/php-developer-jobs-are-the-hottest-ever/</id>
		<updated>2008-08-02T12:54:18Z</updated>
		<published>2008-05-13T09:50:36Z</published>
		<category scheme="http://www.boringguys.com" term="Eclipse" /><category scheme="http://www.boringguys.com" term="Jobs" /><category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Symfony" /><category scheme="http://www.boringguys.com" term="Zend Framework" /><category scheme="http://www.boringguys.com" term="Zend IDE" />		<summary type="html"><![CDATA[** I&#8217;ll preface this by saying that I&#8217;m not specifically looking for a new position but I think it is important to be aware of the market that you serve.  Even in happy times during my employment, I routinely scan job ads to see the health of the market and to gauge its direction. [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/05/13/php-developer-jobs-are-the-hottest-ever/"><![CDATA[<p>** I&#8217;ll preface this by saying that I&#8217;m not specifically looking for a new position but I think it is important to be aware of the market that you serve.  Even in happy times during my employment, I routinely scan job ads to see the health of the market and to gauge its direction.  **</p>
<p>If anecdotal evidence means anything, and sometimes it does&#8230; and at the risk of sounding like a teenage girl writing on a myspace page, the PHP job market is literally blasting off!  I&#8217;ve never seen the market for PHP programmers as strong as it right now in the NYC/Philadelphia region.</p>
<p>While there are lots of PHP jobs in the usual suspects like small start-ups, there also seem to be a number of jobs at established companies and developer shops.  I&#8217;m also seeing a definite split in PHP jobs where there are both entry level jobs as well as jobs for more experienced people with titles like &#8220;Senior PHP Developer&#8221; and &#8220;PHP Tech Lead.&#8221;  I can&#8217;t remember seeing so many senior PHP positions.  The salaries I&#8217;m seeing are also at an all time high.  Many ads have salary ranges that extend well into 6 figures.</p>
<p>As far as requirements I have seen, there definitely seems to be a shift towards frameworks like Symfony and Zend Framework as well as items specifically mentioning IDEs like Eclipse and Zend Studio.  However, I rarely see mention of source code management and unit testing.  Hopefully those items were cut from the job ads due to space requirements.  <img src='http://www.boringguys.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>If you are a PHP developer in the area and are highly experienced, get ready to reap the rewards for your hard work.  If you are a hiring manager in the area, prepare to shell out more for top talent.</p>
<p>So what is everyone else seeing in their area with regards to PHP developer jobs?</p>
<p>.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=110&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_110" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/05/13/php-developer-jobs-are-the-hottest-ever/#comments" thr:count="9" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/05/13/php-developer-jobs-are-the-hottest-ever/feed/atom/" thr:count="9" />
		<thr:total>9</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/05/13/php-developer-jobs-are-the-hottest-ever/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[First impressions on Google App Engine]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/dY0i7OTuOic/" />
		<id>http://www.boringguys.com/2008/04/15/first-impressions-on-google-app-engine/</id>
		<updated>2008-08-02T12:54:35Z</updated>
		<published>2008-04-15T18:06:17Z</published>
		<category scheme="http://www.boringguys.com" term="Google" /><category scheme="http://www.boringguys.com" term="MySQL" /><category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Python" />		<summary type="html"><![CDATA[From the Google site:
Google App Engine lets you run your web applications on Google&#8217;s infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it&#8217;s ready to [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/04/15/first-impressions-on-google-app-engine/"><![CDATA[<p><span></span><a href="http://code.google.com/appengine/docs/whatisgoogleappengine.html">From the Google site</a>:</p>
<p style="margin-left: 0.5in"><em>Google App Engine lets you run your web applications on Google&#8217;s infrastructure. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow. With App Engine, there are no servers to maintain: You just upload your application, and it&#8217;s ready to serve your users.</em></p>
<p style="margin-left: 0.5in"><em>You can serve your app using a free domain name on the <code><span style="font-size: 10pt">appspot.com</span></code> domain, or use <a href="http://www.google.com/a/">Google Apps</a> to serve it from your own domain. You can share your application with the world, or limit access to members of your organization.</em></p>
<p class="MsoNormal">Without actually firing up the SDK yet, here are my initial thoughts:</p>
<ol style="margin-top: 0in" start="1" type="1">
<li class="MsoNormal">Do we      trust Google?<span>  </span>With our data?<span>  </span>With our users?<span>  </span>I love the idea of the Google App Engine (GAE), a scalable      web app system where you only have to worry about coding your business      logic and structuring your models.<span>       </span>This is kind of like Amazon’s EC2 on steroids.<span>  </span>No sysadmin stuff like with EC2, just      coding.<span>  </span>However I do not love that Google is already in the web app space themselves and is now      marketing a web app space hosting platform.<span>  </span>You have to trust them a little bit more      then I’m comfortable with.<span>  They&#8217;ve already got your users  and your data and your code.  Don&#8217;t they conceivably control your business at that point?  Maybe I&#8217;m being paranoid here.</span>Plus, there’s the lock-in factor.<span>       </span>If I develop my app using MySQL as a backend, I know I could with      only some minor pain change that backend to Oracle.<span>  </span>It’s all SQL at some point.<span>  </span>How would you swap out of using the      Google DataStore API?<span>  </span>It’s a      proprietary system with no published standards.<br />
<span> </span></li>
<li class="MsoNormal">GAE is      currently only in Python.<span>  </span>No PHP      love?<span>  </span>I realize a lot of Google      runs on Python and C++ and that’s what it is in their wheelhouse.<span>  </span>But I still consider Python to be a      fringe language.<span>  </span>If GAE were opened      up to support PHP and C#, it would blast off in popularity.<span>  </span>Then again, a Python only crowd is a      good beta test before the crush of PHP devs comes in.<br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--></li>
<li class="MsoNormal">The      DataStore API (ie, BigTable) is difficult to wrap my head around.<span>  </span>After spending so many years carefully      crafting db tables and relationships to get the most bang for my buck, I      now have to throw out a lot of that hard-earned knowledge. <span> </span>I need to think in terms of objects (or      columns) instead of rows.There are still relationships and keys to keep track of but not in the      traditional ways of SQL.<span>  </span>It seems      like much more of your data fetching is done in code rather then in      SQL.<span>  </span>The shift in thinking reminds      me of my own move to Object-Oriented Programming.<span>  </span>I whined like a baby during that phase      of my programming development (well, at least I did on the inside).<span>  </span></li>
</ol>
<p class="MsoNormal"><o> </o>Hopefully I’ll get some more time to play with this stuff soon and report back.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=107&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_107" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/04/15/first-impressions-on-google-app-engine/#comments" thr:count="6" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/04/15/first-impressions-on-google-app-engine/feed/atom/" thr:count="6" />
		<thr:total>6</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/04/15/first-impressions-on-google-app-engine/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[wordpress 2.5 and subversion]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/v6idBaht3O4/" />
		<id>http://www.boringguys.com/2008/04/09/wordpress-25-and-subversion/</id>
		<updated>2008-08-02T12:54:43Z</updated>
		<published>2008-04-09T21:22:25Z</published>
		<category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Subversion" /><category scheme="http://www.boringguys.com" term="Wordpress" />		<summary type="html"><![CDATA[For some reason, performing an svn update on the external repository http://svn.automattic.com/wordpress/trunk/ does absolutely nothing.  This is pretty baffling behavior.  Same wordpress and subversion issue also mentioned here.
I&#8217;ve also tried /tags/2.5  and /branches/2.5 and nothing.  No changes come across.  Very weird.  Anyone else getting this?
Share this via del.icio.us, digg, email, etc.
]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/04/09/wordpress-25-and-subversion/"><![CDATA[<p>For some reason, performing an <strong>svn update</strong> on the external repository <strong>http://svn.automattic.com/wordpress/trunk/ </strong>does absolutely nothing.  This is pretty baffling behavior.  Same <a href="http://www.h4x3d.com/when-svn-up-does-not-work-wordpress-subversion/">wordpress and subversion issue also mentioned here.</a></p>
<p>I&#8217;ve also tried /tags/2.5  and /branches/2.5 and nothing.  No changes come across.  Very weird.  Anyone else getting this?</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=106&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_106" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/04/09/wordpress-25-and-subversion/#comments" thr:count="2" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/04/09/wordpress-25-and-subversion/feed/atom/" thr:count="2" />
		<thr:total>2</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/04/09/wordpress-25-and-subversion/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Symfony sfException Call to undefined method BaseModel::__toString]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/vKcojOvKyJQ/" />
		<id>http://www.boringguys.com/2008/03/19/symfony-sfexception-call-to-undefined-method-basemodel__tostring/</id>
		<updated>2008-08-02T12:55:10Z</updated>
		<published>2008-03-19T13:46:17Z</published>
		<category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Propel" /><category scheme="http://www.boringguys.com" term="Symfony" /><category scheme="http://www.boringguys.com" term="XML" />		<summary type="html"><![CDATA[Working on some projects in Symfony recently.  I ran into a problem when I used the symfony admin generator to create a "backend" module for a table that has a foreign key relationship.
Symfony was looking for me to have a __toString() function in my model so it could create the drop down menu.  [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/03/19/symfony-sfexception-call-to-undefined-method-basemodel__tostring/"><![CDATA[<p>Working on some projects in Symfony recently.  I ran into a problem when I used the symfony admin generator to create a "backend" module for a table that has a foreign key relationship.</p>
<p>Symfony was looking for me to have a __toString() function in my model so it could create the drop down menu.  So for instance, let's say you have tables like countries and states in your schema.xml.  Country_id in the states table is a foreign key to the Countries table like so:</p>
<div class="igBar"><span id="lxml-4"><a href="#" onclick="javascript:showCodeTxt('xml-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">XML:</span>
<div id="xml-4">
<div class="xml">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;table</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"states"</span> <span style="color: #000066;">idmethod</span>=<span style="color: #ff0000;">"native"</span><span style="font-weight: bold; color: black;">&gt;</span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;column</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"id"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"SMALLINT"</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">"true"</span> <span style="color: #000066;">autoincrement</span>=<span style="color: #ff0000;">"true"</span> <span style="color: #000066;">primarykey</span>=<span style="color: #ff0000;">"true"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/column<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;column</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"country_id"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"SMALLINT"</span> <span style="color: #000066;">required</span>=<span style="color: #ff0000;">"true"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;foreign</span> <span style="color: #000066;">foreigntable</span>=<span style="color: #ff0000;">"countries"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;reference</span> <span style="color: #000066;">local</span>=<span style="color: #ff0000;">"country_id"</span> <span style="color: #000066;">foreign</span>=<span style="color: #ff0000;">"id"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/reference<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/foreign<span style="font-weight: bold; color: black;">&gt;</span></span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/column<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;column</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"name"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"VARCHAR"</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">"40"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/column<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;column</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"abbrev"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"VARCHAR"</span> <span style="color: #000066;">size</span>=<span style="color: #ff0000;">"2"</span><span style="font-weight: bold; color: black;">&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/column<span style="font-weight: bold; color: black;">&gt;</span></span></span><span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/table<span style="font-weight: bold; color: black;">&gt;</span></span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>When you do:</p>
<div class="igBar"><span id="lcode-5"><a href="#" onclick="javascript:showCodeTxt('code-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-5">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">symfony propel-init-admin backend states States </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Symfony is going to create the edit and create actions of the States screens with a drop-down menu of countries that the state is a part of.  The value of the country drop down is the country_id.  the value needs to be set in a __toString() function in your Country propel model.  The easiest thing is to just return a simple string name (if that's in your db model):</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showCodeTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> __toString<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span> <span style="color:#0000FF;">$this</span>-&amp;gt;name;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That should solve the problem.  It's odd that this comes up.  And I couldn't find anything on it when googling.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=104&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_104" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/03/19/symfony-sfexception-call-to-undefined-method-basemodel__tostring/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/03/19/symfony-sfexception-call-to-undefined-method-basemodel__tostring/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/03/19/symfony-sfexception-call-to-undefined-method-basemodel__tostring/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Drupal 6 and new Apress Drupal book]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/OXUhwi5PRh4/" />
		<id>http://www.boringguys.com/2008/03/10/drupal-6-and-new-apress-drupal-book/</id>
		<updated>2008-08-02T12:55:18Z</updated>
		<published>2008-03-10T13:20:41Z</published>
		<category scheme="http://www.boringguys.com" term="Books" /><category scheme="http://www.boringguys.com" term="Drupal" /><category scheme="http://www.boringguys.com" term="PHP" />		<summary type="html"><![CDATA[I have been working on a couple of projects using Drupal lately that required creating some custom modules.  So again, I flipped thru my well-worn copy of Pro Drupal Development.  Here is my earlier review of Pro Drupal Development.
Drupal has released version 6 now.  So I click to the Apress site and [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/03/10/drupal-6-and-new-apress-drupal-book/"><![CDATA[<p>I have been working on a couple of projects using <a href="http://drupal.org/">Drupal</a> lately that required creating some custom modules.  So again, I flipped thru my well-worn copy of <a href="http://www.apress.com/book/view/1590597559">Pro Drupal Development</a>.  Here is my earlier <a href="http://www.boringguys.com/2007/07/03/book-review-of-pro-drupal-development-by-john-k-vandyk-and-matt-westgate-published-by-apress/">review of Pro Drupal Development</a>.</p>
<p>Drupal has released version 6 now.  So I click to the Apress site and lo and behold, they're already working on <a href="http://www.apress.com/book/view/1430209895">Pro Drupal Development, 2nd edition</a> which will feature updates for Drupal 6.  If it is as good as the first book, it will be a must have for any Drupal developer.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=103&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_103" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/03/10/drupal-6-and-new-apress-drupal-book/#comments" thr:count="1" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/03/10/drupal-6-and-new-apress-drupal-book/feed/atom/" thr:count="1" />
		<thr:total>1</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/03/10/drupal-6-and-new-apress-drupal-book/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Rich Zygler</name>
						<uri>http://www.boringguys.com</uri>
					</author>
		<title type="html"><![CDATA[Using Subversion externals property for WordPress upgrades]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/boringguys-php/~3/GcrwAQlGs6M/" />
		<id>http://www.boringguys.com/2008/02/18/using-subversion-externals-property-for-wordpress-upgrades/</id>
		<updated>2008-08-02T12:55:28Z</updated>
		<published>2008-02-18T22:33:30Z</published>
		<category scheme="http://www.boringguys.com" term="Drupal" /><category scheme="http://www.boringguys.com" term="PHP" /><category scheme="http://www.boringguys.com" term="Subversion" /><category scheme="http://www.boringguys.com" term="Symfony" /><category scheme="http://www.boringguys.com" term="System Administration" /><category scheme="http://www.boringguys.com" term="Wordpress" />		<summary type="html"><![CDATA[I find that upgrading apps like WordPress, Drupal, Symfony and open source PHP apps is simple for less complicated environments, but once you start adding in things like new directories, custom themes/modules, source code control as well as separate development, test, and production systems, the upgrades start to get pretty hairy.
Take WordPress for example.  [...]]]></summary>
		<content type="html" xml:base="http://www.boringguys.com/2008/02/18/using-subversion-externals-property-for-wordpress-upgrades/"><![CDATA[<p><o></o>I find that upgrading apps like WordPress, Drupal, Symfony and open source PHP apps is simple for less complicated environments, but once you start adding in things like new directories, custom themes/modules, source code control as well as separate development, test, and production systems, the upgrades start to get pretty hairy.</p>
<p>Take WordPress for example.  A typical upgrade of WordPress involves copying the new WordPress files over your existing files.  Then you have to copy back safe versions of things like wp-config.php, .htaccess (if you're using it), as well as any custom themes/modules from the wp-content/ directory.  Not to mention any of your own directories that should exist alongside your wp-includes/ and wp-content/ directories.  After that you can run the upgrade.php file.</p>
<p>These upgrade steps aren't terrible.  They're quite a bit better then most open source apps out there but they still suffer from a few problems:</p>
<ol>
<li>If you have your code, including your WordPress install, in Subversion or another source code control system, you have to commit all the files that change with each WordPress version.  There may be files added, deleted, etc.  You'll have to keep combing thru "svn status" messages to figure out everything you need to do to get all the WordPress files into your repository.  This can be painful.  And take a long time.</li>
<li>WordPress is specifically written so that you don't ever have to muck with the guts of it.  You create themes and plugins for added functionality.  So, since you're not maintaining the code that powers WordPress, do you really need all those deltas in your Subversion repository?  I think not.</li>
<li>What do you do with your own code in directories that sits alongside wp-includes/?  What if it’s in a Subversion repo?</li>
</ol>
<p>The <a href="http://codex.WordPress.org/Installing/Updating_WordPress_with_Subversion">WordPress site also has instructions for using Subversion with your site</a>.  Here, they advocate the use of “svn switch” to update your site.  This is much more manageable and solves a few of the above problems.  Most svn users can probably can get away with this method.  But unfortunately not me.</p>
<p>I have additional directories on some of my sites that I need to add into my WordPress install.  So I  have to copy/move them into the WordPress dirs which gets tough.  And then my “svn status” will get all wonky because my WordPress dir is under one repo and my code is under another.  This was endlessly confusing for me.</p>
<p>So I found myself looking for a way to completely wall off my WordPress install from the rest of my files.  I was reminded recently of the use of the Subversion externals property and my mind started buzzing with possibilities.  With "externals," I can say:</p>
<blockquote><p>Pull the stable WordPress code from WordPress.org and put it into this directory named /docs/wp/</p></blockquote>
<p>Then my other directories, which are under my own local subversion repo can exist at /docs/dir1, /docs/dir2, etc.  Of course, some Apache Alias magic is needed to make all this work.</p>
<p>Here's the way I set it up for my some of my projects.  So far so good.  This is a bit hairy to set up but subsequent upgrades are a breeze.  I use this across development, testing, and production systems (how to get those environments to work with WordPress  will be another entry)</p>
<p>First off, the previous Apache document root for domain1 was at <strong>/www/domain1/docs</strong>, so the WordPress files wound up like this:</p>
<p><strong>/www/domain1/docs/wp-content/</strong><br />
<strong>/www/domain1/docs/wp-includes/</strong></p>
<p>But I also have a lot of dirs that sit alongside of wordpress like this:</p>
<p><strong>/www/domain1/docs/dir1</strong><br />
<strong>/www/domain1/docs/dir2</strong></p>
<p>We're going to wind up changing that.</p>
<p>Create an subversion external property in /www/domain1/docs for WordPress</p>
<div class="igBar"><span id="lcode-13"><a href="#" onclick="javascript:showCodeTxt('code-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-13">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ cd /www/domain1/docs</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ export SVN_EDITOR=vi&nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#40;</span> or your editor of choice <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ svn propedit svn:externals &lt;strong&gt;.&lt;/strong&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
vi starts up and you can add the following line:</p>
<div class="igBar"><span id="lcode-14"><a href="#" onclick="javascript:showCodeTxt('code-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-14">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wp http:<span style="color:#FF9933; font-style:italic;">//svn.automattic.com/WordPress/tags/2.3.3 </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Save and exit</p>
<div class="igBar"><span id="lcode-15"><a href="#" onclick="javascript:showCodeTxt('code-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-15">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ svn commit</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ svn update </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>( This downloads the WordPress code from the above address into your wp/ directory.  Now we are cooking. )</p>
<ul>
<li>Now, /www/domain1/docs/wp is where all your WordPress code lives.</li>
<li>Copy wp-config.php to /www/domain1/docs/wp/</li>
<li>Copy .htaccess to /www/domain1/docs/wp/</li>
<li>Create a link from the stock wp-content/ dir to your personal wp-content dir like this</li>
</ul>
<div class="igBar"><span id="lcode-16"><a href="#" onclick="javascript:showCodeTxt('code-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-16">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ cd /www/domain1/docs/wp</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ rm -Rf wp-content/&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span> use -Rf with care please! <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ ln -s /www/domain1/docs/wp-content wp-content </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<ul>
<li>In Apache config, set document root for this domain to /www/domain1/docs/wp</li>
<li>Put wp-content/ dir and any other non-WordPress dirs/files into  /www/domain1/docs</li>
<li>Create an alias for wp-content/ and any other non-WordPress dirs/files in Apache config</li>
</ul>
<div class="igBar"><span id="lcode-17"><a href="#" onclick="javascript:showCodeTxt('code-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-17">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Alias /wp-content&nbsp; &nbsp; &nbsp;/www/domain1/docs/wp-content</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Alias /dir1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/www/domain1/docs/dir1</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Alias /dir2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/www/domain1/docs/dir2 </div>
</li>
</ol>
</div>
</div>
</div>
<p>
This looks like a lot of work, but it's really only a lot the first time around.  Next time WordPress has an upgrade:</p>
<div class="igBar"><span id="lcode-18"><a href="#" onclick="javascript:showCodeTxt('code-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-18">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ cd /www/domain1/docs</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ svn propedit svn:externals .&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span> change the tag to new version of WordPress <span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ cd wp/</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ rm wp-content&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#40;</span>to remove the link<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ svn update&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#40;</span>to update to new version of WordPress<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ rm -Rf wp-content/</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$$ ln -s /www/domain1/docs/wp-content&nbsp; wp-content </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Everything after the propedit in this group can and should be scripted which will basically give you a 2 step process for upgrading  WordPress, while keeping you wp-content/ dir under local source code control, as well as leaving room for any other directories or files your site might require.</p>
<p>This technique will probably also work with Symfony although I haven’t tried it yet.</p>
<p class="akst_link"><a href="http://www.boringguys.com/?p=102&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_102" class="akst_share_link" rel="nofollow"><b>Share this</b> via del.icio.us, digg, email, etc.</a>
</p>]]></content>
		<link rel="replies" type="text/html" href="http://www.boringguys.com/2008/02/18/using-subversion-externals-property-for-wordpress-upgrades/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://www.boringguys.com/2008/02/18/using-subversion-externals-property-for-wordpress-upgrades/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://www.boringguys.com/2008/02/18/using-subversion-externals-property-for-wordpress-upgrades/</feedburner:origLink></entry>
	</feed><!-- Dynamic Page Served (once) in 0.567 seconds --><!-- Cached page served by WP-Cache -->
