<?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: A better Zend Framework &amp; Smarty integration</title>
	<atom:link href="http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration</link>
	<description>Coding, Life</description>
	<lastBuildDate>Thu, 22 Jul 2010 03:51:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kelly</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-676</link>
		<dc:creator>Kelly</dc:creator>
		<pubDate>Tue, 30 Mar 2010 17:16:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-676</guid>
		<description>thanks for this article, I was able to adapt it quite quickly to my codebase. I also enjoy the aforementioned book, although I started it, I ended up taking a step back to get some more fundamentals under my belt first and now am just coming back to zend framework. I would reccommend to anyone starting out with a php from novice to professional type book, then going to something for zend framework. &#160;</description>
		<content:encoded><![CDATA[<p>thanks for this article, I was able to adapt it quite quickly to my codebase. I also enjoy the aforementioned book, although I started it, I ended up taking a step back to get some more fundamentals under my belt first and now am just coming back to zend framework. I would reccommend to anyone starting out with a php from novice to professional type book, then going to something for zend framework. &nbsp;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jules</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-668</link>
		<dc:creator>Jules</dc:creator>
		<pubDate>Mon, 22 Mar 2010 21:11:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-668</guid>
		<description>Hi Andrea&#160;Thanks for this usefull method,it&#039;s appear that i&#039;ve a problem&lt;code&gt;&lt;b&gt;Fatal error&lt;/b&gt;: Uncaught exception &#039;Zend_Controller_Dispatcher_Exception&#039; with message &#039;Invalid controller specified (admin)&#039; in ..&lt;/code&gt;unfortunately i don&#039;t see any problem in my Bootstrap and i use the modular structure.If i create an AdminController in the folder /controllers under /app i see a new message &#039;admin.phtml not found&#039;What is really strange is that all the smarty template as described as you works great.Is someone see what kind of problem it is ?many thanks</description>
		<content:encoded><![CDATA[<p>Hi Andrea&nbsp;Thanks for this usefull method,it&#8217;s appear that i&#8217;ve a problem&lt;code&gt;<b>Fatal error</b>: Uncaught exception &#8216;Zend_Controller_Dispatcher_Exception&#8217; with message &#8216;Invalid controller specified (admin)&#8217; in ..&lt;/code&gt;unfortunately i don&#8217;t see any problem in my Bootstrap and i use the modular structure.If i create an AdminController in the folder /controllers under /app i see a new message &#8216;admin.phtml not found&#8217;What is really strange is that all the smarty template as described as you works great.Is someone see what kind of problem it is ?many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrea belvedere</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-644</link>
		<dc:creator>andrea belvedere</dc:creator>
		<pubDate>Wed, 03 Mar 2010 15:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-644</guid>
		<description>Hi Pravin,
That error means that the Zend folder is not in your include path.
so the line:
&lt;code&gt;require_once &#039;Zend/Loader.php&#039;;&lt;/code&gt;
fails as the Loader.php file is not found.
Make sure the Zend folder is in your include path. The bootstrap.php file attempts to include the Zend folder in the include path with the lines:
&lt;code&gt;
// Set our include path
$include_path = get_include_path().PATH_SEPARATOR;
$include_path .= SITE_ROOT.&#039;/application/lib&#039;.PATH_SEPARATOR;
$include_path .= SITE_ROOT.&#039;/application/models&#039;.PATH_SEPARATOR;
$include_path .= SITE_ROOT.&#039;/application/include&#039;.PATH_SEPARATOR;
set_include_path($include_path);
&lt;/code&gt;
however for the lines above to work the SITE_ROOT defined variable must be correctly set, which means that in your case this:
&lt;code&gt;dirname($_SERVER[&#039;DOCUMENT_ROOT&#039;])&lt;/code&gt;
should return the following:
&lt;code&gt;C:\wamp\www\zend&lt;/code&gt;
but in your case is returning:
&lt;code&gt;C:\wamp\&lt;/code&gt;

So to make it work correctly you have the following options:
1) change your &quot;DocumentRoot&quot; in your apache configuration file, or VirtualHost block to point to &lt;code&gt;C:\wamp\www\zend\htdocs&lt;/code&gt; so it should be &lt;code&gt;DocumentRoot C:/wamp/www/zend/htdocs&lt;/code&gt;
&lt;strong&gt;or&lt;/strong&gt;
2) change this line in the bootstrap.php file, from:
&lt;code&gt;define(&quot;SITE_ROOT&quot;, dirname($_SERVER[&#039;DOCUMENT_ROOT&#039;]));&lt;/code&gt; to
&lt;code&gt;define(&quot;SITE_ROOT&quot;, &quot;C:/wamp/www/zend&quot;);&lt;/code&gt;

hope it helps
andrea</description>
		<content:encoded><![CDATA[<p>Hi Pravin,<br />
That error means that the Zend folder is not in your include path.<br />
so the line:<br />
<code>require_once 'Zend/Loader.php';</code><br />
fails as the Loader.php file is not found.<br />
Make sure the Zend folder is in your include path. The bootstrap.php file attempts to include the Zend folder in the include path with the lines:<br />
<code><br />
// Set our include path<br />
$include_path = get_include_path().PATH_SEPARATOR;<br />
$include_path .= SITE_ROOT.'/application/lib'.PATH_SEPARATOR;<br />
$include_path .= SITE_ROOT.'/application/models'.PATH_SEPARATOR;<br />
$include_path .= SITE_ROOT.'/application/include'.PATH_SEPARATOR;<br />
set_include_path($include_path);<br />
</code><br />
however for the lines above to work the SITE_ROOT defined variable must be correctly set, which means that in your case this:<br />
<code>dirname($_SERVER['DOCUMENT_ROOT'])</code><br />
should return the following:<br />
<code>C:\wamp\www\zend</code><br />
but in your case is returning:<br />
<code>C:\wamp\</code></p>
<p>So to make it work correctly you have the following options:<br />
1) change your &#8220;DocumentRoot&#8221; in your apache configuration file, or VirtualHost block to point to <code>C:\wamp\www\zend\htdocs</code> so it should be <code>DocumentRoot C:/wamp/www/zend/htdocs</code><br />
<strong>or</strong><br />
2) change this line in the bootstrap.php file, from:<br />
<code>define("SITE_ROOT", dirname($_SERVER['DOCUMENT_ROOT']));</code> to<br />
<code>define("SITE_ROOT", "C:/wamp/www/zend");</code></p>
<p>hope it helps<br />
andrea</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pravin</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-642</link>
		<dc:creator>Pravin</dc:creator>
		<pubDate>Wed, 03 Mar 2010 08:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-642</guid>
		<description>Hello,&#160;&#160;You site is greate. I have download the code and put that folder in c:/wamp/www folder and run it in browser then they give following error :&#160;&lt;b&gt;Warning&lt;/b&gt;: require_once(Zend/Loader.php) [&lt;a href=&quot;http://localhost/zend/htdocs/function.require-once&quot; rel=&quot;nofollow&quot;&gt;function.require-once&lt;/a&gt;]: failed to open stream: No such file or directory in&#160;&lt;b&gt;C:\wamp\www\zend\application\bootstrap.php&lt;/b&gt;on line&#160;&lt;b&gt;21&lt;/b&gt;&lt;b&gt;Fatal error&lt;/b&gt;: require_once() [&lt;a href=&quot;http://localhost/zend/htdocs/function.require&quot; rel=&quot;nofollow&quot;&gt;function.require&lt;/a&gt;]: Failed opening required &#039;Zend/Loader.php&#039; (include_path=&#039;.;C:\php5\pear;C:/wamp/application/lib;C:/wamp/application/models;C:/wamp/application/include;&#039;) in&#160;&lt;b&gt;C:\wamp\www\zend\application\bootstrap.php&lt;/b&gt;on line&#160;&lt;b&gt;21&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;Please sugest.&lt;/b&gt;</description>
		<content:encoded><![CDATA[<p>Hello,&nbsp;&nbsp;You site is greate. I have download the code and put that folder in c:/wamp/www folder and run it in browser then they give following error :&nbsp;<b>Warning</b>: require_once(Zend/Loader.php) [<a href="http://localhost/zend/htdocs/function.require-once" rel="nofollow">function.require-once</a>]: failed to open stream: No such file or directory in&nbsp;<b>C:\wamp\www\zend\application\bootstrap.php</b>on line&nbsp;<b>21</b><b>Fatal error</b>: require_once() [<a href="http://localhost/zend/htdocs/function.require" rel="nofollow">function.require</a>]: Failed opening required &#8216;Zend/Loader.php&#8217; (include_path=&#8217;.;C:\php5\pear;C:/wamp/application/lib;C:/wamp/application/models;C:/wamp/application/include;&#8217;) in&nbsp;<b>C:\wamp\www\zend\application\bootstrap.php</b>on line&nbsp;<b>21</b><b></b><b>Please sugest.</b></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Enoch Kirschenmann</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-626</link>
		<dc:creator>Enoch Kirschenmann</dc:creator>
		<pubDate>Wed, 24 Feb 2010 03:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-626</guid>
		<description>I just couldnt leave your web site before saying that I truly enjoyed the quality information you provide for your visitors. Will be back generally to check up on new information in you article!</description>
		<content:encoded><![CDATA[<p>I just couldnt leave your web site before saying that I truly enjoyed the quality information you provide for your visitors. Will be back generally to check up on new information in you article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krack</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-529</link>
		<dc:creator>Krack</dc:creator>
		<pubDate>Fri, 04 Dec 2009 08:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-529</guid>
		<description>Hellodo you change&lt;code&gt;require_once &quot;Zend/Loader.php&quot;;
Zend_Loader::registerAutoload();
&lt;/code&gt;to&#160;require_once &quot;Zend/Loader/Autoloader.php&quot;;$autoloader = Zend_Loader_Autoloader::getInstance();$autoloader-&gt;setFallbackAutoloader(true);</description>
		<content:encoded><![CDATA[<p>Hellodo you change<code>require_once "Zend/Loader.php";<br />
Zend_Loader::registerAutoload();<br />
</code>to&nbsp;require_once &#8220;Zend/Loader/Autoloader.php&#8221;;$autoloader = Zend_Loader_Autoloader::getInstance();$autoloader-&gt;setFallbackAutoloader(true);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nicolas</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-422</link>
		<dc:creator>nicolas</dc:creator>
		<pubDate>Wed, 11 Nov 2009 18:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-422</guid>
		<description>hey Andrea, need your help again after i experience fatal error in section 1 of your tutorial, now it happen again in section 2 as below:
&lt;b&gt;Catchable fatal error&lt;/b&gt;: Argument 1 passed to
Zend_Config::__construct() must be an array, integer given, called in
C:\xampp\htdocs\zend\application\bootstrap.php on line 23 and defined
in &lt;b&gt;C:\xampp\htdocs\zend\application\lib\Zend\Config.php&lt;/b&gt; on line &lt;b&gt;98&lt;/b&gt;</description>
		<content:encoded><![CDATA[<p>hey Andrea, need your help again after i experience fatal error in section 1 of your tutorial, now it happen again in section 2 as below:<br />
<b>Catchable fatal error</b>: Argument 1 passed to<br />
Zend_Config::__construct() must be an array, integer given, called in<br />
C:\xampp\htdocs\zend\application\bootstrap.php on line 23 and defined<br />
in <b>C:\xampp\htdocs\zend\application\lib\Zend\Config.php</b> on line <b>98</b></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alfonso</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-307</link>
		<dc:creator>Alfonso</dc:creator>
		<pubDate>Sat, 27 Jun 2009 03:54:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-307</guid>
		<description>Great tutorial!

I have a couple questions tho.  I currently have a site running on smarty, but the way I use it, well it&#039;s different.  I like it tho.  I&#039;ve been trying to modify your code to get it to work but not sure if i can.  Not to experienced with Zend so here it goes.

I want to have a wrapper file that gets included on every action.  Now, I have a tag in the wrapper called {$body}.  This tag gets replaced by the file that the current template is associated with.  So for example I would like to have this done.... 

http://www.example.com/members/view

I would like the wrapper to be included but the file in the /views/default/members/view.tpl be included in as an {include file=???}

Is there a way I can do this?  Still reading up on Zend so please bare with me.</description>
		<content:encoded><![CDATA[<p>Great tutorial!</p>
<p>I have a couple questions tho.  I currently have a site running on smarty, but the way I use it, well it&#8217;s different.  I like it tho.  I&#8217;ve been trying to modify your code to get it to work but not sure if i can.  Not to experienced with Zend so here it goes.</p>
<p>I want to have a wrapper file that gets included on every action.  Now, I have a tag in the wrapper called {$body}.  This tag gets replaced by the file that the current template is associated with.  So for example I would like to have this done&#8230;. </p>
<p><a href="http://www.example.com/members/view" rel="nofollow">http://www.example.com/members/view</a></p>
<p>I would like the wrapper to be included but the file in the /views/default/members/view.tpl be included in as an {include file=???}</p>
<p>Is there a way I can do this?  Still reading up on Zend so please bare with me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zendrej</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-205</link>
		<dc:creator>zendrej</dc:creator>
		<pubDate>Fri, 13 Mar 2009 03:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-205</guid>
		<description>Thank you Andrea.

I will try out an example and come back to you.

Thanks a ton for replying.

regards,
rej</description>
		<content:encoded><![CDATA[<p>Thank you Andrea.</p>
<p>I will try out an example and come back to you.</p>
<p>Thanks a ton for replying.</p>
<p>regards,<br />
rej</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrea belvedere</title>
		<link>http://www.andreabelvedere.com/coding/a-better-zend-framework-smarty-integration/comment-page-1#comment-204</link>
		<dc:creator>andrea belvedere</dc:creator>
		<pubDate>Thu, 12 Mar 2009 12:11:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.andreabelvedere.com/?p=12#comment-204</guid>
		<description>Hi Rej,
Pear and ZF are totally compatible, (as they both use the same name convention) in fact using ZF autoload:
&lt;code&gt;
require_once &quot;Zend/Loader.php&quot;; 
Zend_Loader::registerAutoload();
&lt;/code&gt;
you will be able to use pear classes without requiring or including them, just make sure the pear directory is in your php classpath.
hope it help.</description>
		<content:encoded><![CDATA[<p>Hi Rej,<br />
Pear and ZF are totally compatible, (as they both use the same name convention) in fact using ZF autoload:<br />
<code><br />
require_once "Zend/Loader.php";<br />
Zend_Loader::registerAutoload();<br />
</code><br />
you will be able to use pear classes without requiring or including them, just make sure the pear directory is in your php classpath.<br />
hope it help.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
