<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Advanced bootstrapping : Configure your Zend Framework application for multiple host</title>
	<atom:link href="http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/</link>
	<description>Exploring PHP, MySql, Javascript, jQuery, Zend Framework and more... from Bangladesh</description>
	<lastBuildDate>Tue, 16 Mar 2010 23:51:01 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: pete</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2910</link>
		<dc:creator>pete</dc:creator>
		<pubDate>Thu, 20 Aug 2009 11:04:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2910</guid>
		<description>This is the great blog, I&#039;m reading them for a while, thanks for the new posts!</description>
		<content:encoded><![CDATA[<p>This is the great blog, I&#8217;m reading them for a while, thanks for the new posts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: premium website link directory</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2898</link>
		<dc:creator>premium website link directory</dc:creator>
		<pubDate>Mon, 10 Aug 2009 07:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2898</guid>
		<description>I am a beginner in Zend framework.
It was a good article about zend.</description>
		<content:encoded><![CDATA[<p>I am a beginner in Zend framework.<br />
It was a good article about zend.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Netemp</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2889</link>
		<dc:creator>Netemp</dc:creator>
		<pubDate>Tue, 04 Aug 2009 18:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2889</guid>
		<description>nice article, thanks for sharing.

I was wondering if you could point me to some post or article where I can understand bootstrapping better. Do suggest me some way for this.

Many Thanks in Advance</description>
		<content:encoded><![CDATA[<p>nice article, thanks for sharing.</p>
<p>I was wondering if you could point me to some post or article where I can understand bootstrapping better. Do suggest me some way for this.</p>
<p>Many Thanks in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Environment specific bootstrapping for Zend Framework - Brenton Alker's Deprecated Behaviour</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2850</link>
		<dc:creator>Environment specific bootstrapping for Zend Framework - Brenton Alker's Deprecated Behaviour</dc:creator>
		<pubDate>Thu, 25 Jun 2009 06:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2850</guid>
		<description>[...] an obvious example. Many approaches I have seen to dealing with this, including Anis uddin Ahmad&#039;s post that inspired this one, involve determining the&#160; domain the application is running on, and loading a pre-determined [...]</description>
		<content:encoded><![CDATA[<p>[...] an obvious example. Many approaches I have seen to dealing with this, including Anis uddin Ahmad&#8217;s post that inspired this one, involve determining the&nbsp; domain the application is running on, and loading a pre-determined [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wiseman</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2707</link>
		<dc:creator>Wiseman</dc:creator>
		<pubDate>Sat, 16 May 2009 03:46:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2707</guid>
		<description>Have you ever worked with any other J2EE (aka java framework) for example, Struts. It should be 101 for any distributed development environment. Good start for using Zend Framework !!! Cheers. Good work!</description>
		<content:encoded><![CDATA[<p>Have you ever worked with any other J2EE (aka java framework) for example, Struts. It should be 101 for any distributed development environment. Good start for using Zend Framework !!! Cheers. Good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: openbsdiste</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2584</link>
		<dc:creator>openbsdiste</dc:creator>
		<pubDate>Wed, 18 Feb 2009 11:02:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2584</guid>
		<description>I made a boo boo ! html tags are stripped :(

my config file is an xml config file, I assign a tag &quot;server&quot; with dev, prod, etc. in sections named by hostname. When I load my config file, I juste have to specify the hostname</description>
		<content:encoded><![CDATA[<p>I made a boo boo ! html tags are stripped <img src='http://www.ajaxray.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>my config file is an xml config file, I assign a tag &#8220;server&#8221; with dev, prod, etc. in sections named by hostname. When I load my config file, I juste have to specify the hostname</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: openbsdiste</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2583</link>
		<dc:creator>openbsdiste</dc:creator>
		<pubDate>Wed, 18 Feb 2009 10:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2583</guid>
		<description>I use a different way to configure server. I don&#039;t really like $servers=...
Instead I use an other config file based on hostname.

    dev


    prod
...
With a new server, I only have to modify my config file to add my new server...</description>
		<content:encoded><![CDATA[<p>I use a different way to configure server. I don&#8217;t really like $servers=&#8230;<br />
Instead I use an other config file based on hostname.</p>
<p>    dev</p>
<p>    prod<br />
&#8230;<br />
With a new server, I only have to modify my config file to add my new server&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anis Ahmad</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2576</link>
		<dc:creator>Anis Ahmad</dc:creator>
		<pubDate>Sun, 15 Feb 2009 07:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2576</guid>
		<description>@Brenton Alker, 
@RenÃ© Leonhardt

Hi Friends,
Thanks a lot for great Ideas.

Brenton, I&#039;ve just visited you post and blog. It&#039;s really excellent!!</description>
		<content:encoded><![CDATA[<p>@Brenton Alker,<br />
@RenÃ© Leonhardt</p>
<p>Hi Friends,<br />
Thanks a lot for great Ideas.</p>
<p>Brenton, I&#8217;ve just visited you post and blog. It&#8217;s really excellent!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RenÃ© Leonhardt</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2573</link>
		<dc:creator>RenÃ© Leonhardt</dc:creator>
		<pubDate>Fri, 13 Feb 2009 09:03:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2573</guid>
		<description>A shorter beginning for index.php would be:


$servers = array_fill_keys(array(&#039;local.myapp.com&#039;, &#039;another.localhost.com&#039;), &#039;development&#039;);
$servers += array_fill_keys(array(&#039;myapp.devs-staging.com&#039;, &#039;clients-staging.com&#039;), &#039;staging&#039;);
$servers += array_fill_keys(array(&#039;myapp.com&#039;), &#039;production&#039;);

if(isset($servers[$_SERVER[&#039;HTTP_HOST&#039;]])) {
    define(&#039;APPSTAGE&#039;, $servers[$_SERVER[&#039;HTTP_HOST&#039;]]);
    set_include_path(&#039;path/of/&#039; . APPSTAGE . &#039;/library&#039; . PATH_SEPARATOR . &#039;../myapp/path/of/models&#039; . PATH_SEPARATOR . get_include_path());
    unset($servers);
} else {
    die(&#039;Application is not within configured servers.&#039;);
}</description>
		<content:encoded><![CDATA[<p>A shorter beginning for index.php would be:</p>
<p>$servers = array_fill_keys(array(&#8217;local.myapp.com&#8217;, &#8216;another.localhost.com&#8217;), &#8216;development&#8217;);<br />
$servers += array_fill_keys(array(&#8217;myapp.devs-staging.com&#8217;, &#8216;clients-staging.com&#8217;), &#8217;staging&#8217;);<br />
$servers += array_fill_keys(array(&#8217;myapp.com&#8217;), &#8216;production&#8217;);</p>
<p>if(isset($servers[$_SERVER['HTTP_HOST']])) {<br />
    define(&#8217;APPSTAGE&#8217;, $servers[$_SERVER['HTTP_HOST']]);<br />
    set_include_path(&#8217;path/of/&#8217; . APPSTAGE . &#8216;/library&#8217; . PATH_SEPARATOR . &#8216;../myapp/path/of/models&#8217; . PATH_SEPARATOR . get_include_path());<br />
    unset($servers);<br />
} else {<br />
    die(&#8217;Application is not within configured servers.&#8217;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brenton Alker</title>
		<link>http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/comment-page-1/#comment-2571</link>
		<dc:creator>Brenton Alker</dc:creator>
		<pubDate>Thu, 12 Feb 2009 23:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.ajaxray.com/blog/2009/02/03/advanced-bootstrapping-configure-your-zend-framework-application-for-multiple-host/#comment-2571</guid>
		<description>Thanks for sharing. I hadn&#039;t seen this Bootstrap.php before, will take a look at that.

I do have some problems with this method of loading configuration though. Firstly, the need to add the domains to the configuration - meaning every new domain (new developers, a local fork by me etc) will result in changes to the code base. Secondly, I&#039;m not sure how you handle CLI scripts using this? - almost every larger application I&#039;ve made has used CLI for batch processing etc.

I&#039;ve posted (http://blog.tekerson.com/2009/02/13/environment-specific-bootstrapping-for-zend-framework/) the method I use to handle the same problem. It uses separate configuration files instead of &quot;sections&quot;, but could easily be modified if you prefer the sections approach.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing. I hadn&#8217;t seen this Bootstrap.php before, will take a look at that.</p>
<p>I do have some problems with this method of loading configuration though. Firstly, the need to add the domains to the configuration &#8211; meaning every new domain (new developers, a local fork by me etc) will result in changes to the code base. Secondly, I&#8217;m not sure how you handle CLI scripts using this? &#8211; almost every larger application I&#8217;ve made has used CLI for batch processing etc.</p>
<p>I&#8217;ve posted (<a href="http://blog.tekerson.com/2009/02/13/environment-specific-bootstrapping-for-zend-framework/" rel="nofollow">http://blog.tekerson.com/2009/02/13/environment-specific-bootstrapping-for-zend-framework/</a>) the method I use to handle the same problem. It uses separate configuration files instead of &#8220;sections&#8221;, but could easily be modified if you prefer the sections approach.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
