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

<channel>
	<title>Encodez Blog &#187; Zend Framework</title>
	<atom:link href="http://encodez.com/blog/category/others/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://encodez.com/blog</link>
	<description>Computer language design is just like a stroll in the park. Jurassic Park, that is. — Larry Wall</description>
	<lastBuildDate>Thu, 22 Jul 2010 05:34:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>My first step to Zend Framework</title>
		<link>http://encodez.com/blog/2009/02/step-into-zend-fatel-error-solved/</link>
		<comments>http://encodez.com/blog/2009/02/step-into-zend-fatel-error-solved/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 22:19:57 +0000</pubDate>
		<dc:creator>Muneer Shaheed</dc:creator>
				<category><![CDATA[Webdevelopement]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.encodez.com/blog/?p=130</guid>
		<description><![CDATA[Good Day !!! I am just keeping my leg in to Zend Framework. Extending the art &#38; spirit of PHP, Zend Framework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase. At the first step I faced several problems. Mainly the one was Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' [...]]]></description>
			<content:encoded><![CDATA[<p>Good Day !!!</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6032126876218296";
google_ad_slot = "8998015769";
google_ad_width = 468;
google_ad_height = 60;
google_cpa_choice = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>I am just keeping my leg in to <a title="Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a>.</p>
<blockquote><p>Extending the art &amp; spirit of PHP, Zend Framework is based     on simplicity, object-oriented best practices, corporate friendly licensing,     and a rigorously tested agile codebase.</p></blockquote>
<p>At the first step I faced several problems. Mainly the one was</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Fatal error: Uncaught exception <span style="color: #ff0000;">'Zend_Controller_Dispatcher_Exception'</span> with message <span style="color: #ff0000;">'Invalid controller specified (error)'</span> <span style="color: #000000; font-weight: bold;">in</span> C:\wamp\library\Zend\Controller\Dispatcher\Standard.php:<span style="color: #000000;">241</span> Stack trace: <span style="color: #666666; font-style: italic;">#0 C:\wamp\library\Zend\Controller\Front.php(934):</span>
 Zend_Controller_Dispatcher_Standard-<span style="color: #000000; font-weight: bold;">&amp;</span>gt;dispatch<span style="color: #7a0874; font-weight: bold;">&#40;</span>Object<span style="color: #7a0874; font-weight: bold;">&#40;</span>Zend_Controller_Request_Http<span style="color: #7a0874; font-weight: bold;">&#41;</span>, 
Object<span style="color: #7a0874; font-weight: bold;">&#40;</span>Zend_Controller_Response_Http<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #666666; font-style: italic;">#1 C:\wamp\www\test\zendTest3\html\index.php(6): Zend_Controller_Front-&amp;gt;dispatch() #2 {main} thrown in C:\wamp\library\Zend\Controller\Dispatcher\Standard.php on line 241</span></pre></div></div>

<p>This is what made me fedup on earlier step.</p>
<p>But with my trustful effort I managed to find out the reason why I am getting this error. It was mainly because of Path. The path to <strong>controllers</strong> directory. I guess it is because of the OS what I was using is Windows. Linux users might not get this problem. To overcome this problem, it is best practice to specify the path by calling current directory using the script as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'APPLICATION_PATH'</span><span style="color: #009900;">&#41;</span>
or <span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'APPLICATION_PATH'</span><span style="color: #339933;">,</span> <span style="color: #990000;">dirname</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$frontController</span> <span style="color: #339933;">=</span> Zend_Controller_Front<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$frontController</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setControllerDirectory</span><span style="color: #009900;">&#40;</span>APPLICATION_PATH<span style="color: #339933;">.</span><span style="color: #0000ff;">'/controllers'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This is the best coding practice given by Zend. <img src='http://encodez.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Never forget the standards.</p>
]]></content:encoded>
			<wfw:commentRss>http://encodez.com/blog/2009/02/step-into-zend-fatel-error-solved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
