<?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>Always Right &#187; projects</title> <atom:link href="http://www.stefanoforenza.com/category/projects/feed/" rel="self" type="application/rss+xml" /><link>http://www.stefanoforenza.com</link> <description>Stefano Forenza - Personal Blog</description> <lastBuildDate>Tue, 31 Jan 2012 01:39:06 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Hitting the duck</title><link>http://www.stefanoforenza.com/hitting-the-duck/</link> <comments>http://www.stefanoforenza.com/hitting-the-duck/#comments</comments> <pubDate>Mon, 16 Jun 2008 11:57:09 +0000</pubDate> <dc:creator>Stefano Forenza</dc:creator> <category><![CDATA[projects]]></category> <category><![CDATA[rapache]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.stefanoforenza.com/?p=47</guid> <description><![CDATA[It&#8217;s been 2 busy days. I didn&#8217;t really expected to receive any response on my previous post about Rapache and that was cool. Some of the received suggestion have been  already implemented, so, if you&#8217;re still interested in Rapache, pull it from stage0 branch and check it out. Shhht! Don&#8217;t tell anyone, the secret command [...]]]></description> <content:encoded><![CDATA[<p>It&#8217;s been 2 busy days. I didn&#8217;t really expected to receive any response on my previous post about Rapache and that was cool. Some of the received suggestion have been  already implemented, so, if you&#8217;re still interested in Rapache, pull it from stage0 branch and check it out.</p><p>Shhht! Don&#8217;t tell anyone, the secret command to get the code is:</p><pre>bzr branch lp:~rapache-devel/rapache/rapache-stage0</pre><p><strong>Some people asked how to help.</strong></p><p>Well, the first way to help is to open new bugs (even for feature requests, just open a bug and explain your idea). You can do it at <a
href="https://launchpad.net/rapache">https://launchpad.net/rapache</a> .</p><p>The second way is actually&#8230; to solve bugs, or indicate a way to solve them. I&#8217;ve tagged a bunch of them as &#8216;need-help&#8217;. You cand find them here: <a
href="https://bugs.launchpad.net/rapache/+bugs?field.tag=need-help">https://bugs.launchpad.net/rapache/+bugs?field.tag=need-help</a>. For this kind of bugs, we don&#8217;t need a full patch, you can just send a proof of concept indicating how to solve the bug. That would save us a nice amount of googling <img
src='http://www.stefanoforenza.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p><p><strong>I forgot to say: thank you thank you thank you.</strong></p><p>Thank you thank you thanks to you all for having told me that rapache gui sucked. Shame on you <img
src='http://www.stefanoforenza.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . I tried to re-organize the main window at the best of my skills. We also had to wake up <a
href="https://launchpad.net/~pollelu">Luana</a> and ask her to revamp our application icon.</p><p
style="text-align: center;">Here is the result of all the effort:<a
href="http://www.stefanoforenza.com/blog/wp-content/uploads/2008/06/rapache-can-fix-it.png"><img
class="aligncenter size-full wp-image-48" title="rapache-can-fix-it" src="http://www.stefanoforenza.com/blog/wp-content/uploads/2008/06/rapache-can-fix-it.png" alt="Rapache can fix it" /></a></p><p
style="text-align: left;">As you can see Rapache can now take care of vhost definitions only present into /etc/apache2/sites-enabled and not present inside sites-available (the correct way would be to create the vhost configuration file inside sites-available and then link to it from sites-enabled in order to enabling it).</p><p
style="text-align: left;"><strong>How do Rapache and Ubuntu relate ?</strong></p><p
style="text-align: left;">My very first aim with Rapache was to help webdev beginners and webdesigner (oh, they hate configuration files so much) to quickly be able to handle apache in the correct way. Giving support in ubuntu irc support channels I noticed many people came there asking how to set up apache and, even easy as it is creating a new virtual host, helping them required a lot of time each.</p><p
style="text-align: left;">As for now, the primary goal of apache is to get in a decent shape soon enough to be proposed for Intrepid universe repositories. In order to be able to accomplish such goal, we should focus on a realistic set of features and test them enough to make everything working smoothly. It&#8217;s of course better a small working program than a big buggy ball of mud.</p><p
style="text-align: left;">That said: which features do you think we still miss in order to make sense for a repo inclusion ? Would you open some bug in launchpad and tell us about what we need to do ? Help us <a
href="http://www.stefanoforenza.com/me-and-rapache/#comment-22230">hit the duck</a> <img
src='http://www.stefanoforenza.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p><p
style="text-align: left;"><strong>Come say &#8220;hello!&#8221;</strong></p><p
style="text-align: left;">Last post I forgot to tell we have an irc channel on freenode. Feel free to drop in #rapache to greet us and talk to us.</p> ]]></content:encoded> <wfw:commentRss>http://www.stefanoforenza.com/hitting-the-duck/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Me and Rapache</title><link>http://www.stefanoforenza.com/me-and-rapache/</link> <comments>http://www.stefanoforenza.com/me-and-rapache/#comments</comments> <pubDate>Sat, 14 Jun 2008 11:01:16 +0000</pubDate> <dc:creator>Stefano Forenza</dc:creator> <category><![CDATA[projects]]></category> <category><![CDATA[rapache]]></category> <category><![CDATA[ubuntu]]></category> <guid
isPermaLink="false">http://www.stefanoforenza.com/?p=42</guid> <description><![CDATA[For those who missed the announce on Ubuntu Planet, a new project &#8211; called Rapache &#8211; is born. What is Rapache ? Rapache is a simple Apache administration tool. It offers a GTK interface to allow extremely rapid VirtualHost creation and manipulation. Favicons add a nice touch to the list Personally, as a web developer, [...]]]></description> <content:encoded><![CDATA[<p>For those who missed the announce on Ubuntu Planet, a new project &#8211; called <a
href="http://launchpad.net/rapache">Rapache</a> &#8211; is born.</p><p><strong>What is Rapache ?</strong></p><p>Rapache is a simple Apache administration tool. It offers a GTK interface to allow extremely rapid VirtualHost creation and manipulation.</p><p
style="text-align: center;"><a
href="http://www.stefanoforenza.com/blog/wp-content/uploads/2008/06/rapache-alpha.png"><img
class="aligncenter size-full wp-image-43" title="Rapache\'s virtual-hosts list" src="http://www.stefanoforenza.com/blog/wp-content/uploads/2008/06/rapache-alpha.png" alt="Picture that shows the main window of Rapache" /></a><br
/> <em>Favicons add a nice touch to the list <img
src='http://www.stefanoforenza.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br
/> </em></p><p>Personally, as a web developer, I felt the need of a simple tool to manage virtualhosts on my localhost for a long time, just because creating them at hand is way too time consuming than I&#8217;d like. Then, right after stumbling on <a
href="http://clickontyler.com/virtualhostx/">this</a> and reading users comments (some may be biased, I know), I decided to make such a tool by myself.</p><p>Funnily enough, me and <a
href="http://en.emanuele-gentili.com/">Emgent</a> had the same idea at the same time so, when he <a
href="http://en.emanuele-gentili.com/index.php/2008/05/29/rapache-stay-tuned/">announced</a> the project, I got in touch with him and we decided to join forces.</p><p
style="text-align: center;"><a
href="http://www.stefanoforenza.com/blog/wp-content/uploads/2008/06/rapache-vhost-detail.png"><img
class="aligncenter size-full wp-image-44" title="Rapache Virtualhost creation" src="http://www.stefanoforenza.com/blog/wp-content/uploads/2008/06/rapache-vhost-detail.png" alt="Rapache Virtualhost creation" /></a></p><p><strong>What to expect</strong></p><p>Personally I would have not announced the project before having already put together the basic program. We divided our roadmap in basically 3 stages, the first being my original previous goal.</p><ul><li><strong>Stage 0:</strong> basic functionality on localhost. Virtual hosts and Apache modules enabling/disabling/modification. Aimed to web developers.</li><li><strong>Stage 1:</strong> Localization, more polished Gui. Functional separation before GUI and Libraries (i.e. a number of handy commands you can use from commandline). A number of handy wizards to handle common configuration issue. More Apache configuration options available from the GUI</li><li><strong>Stage 2:</strong> Sky&#8217;s the limit <img
src='http://www.stefanoforenza.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . Handling remote servers via SSH. Server bookmarking.</li></ul><p><strong>What not to expect</strong></p><p>At the moment we&#8217;re relying on debian way to handle Apache configuration. So do not expect to be able to run Rapache on a non-debian system at lease before Stage 3, maybe not even afterwards. That&#8217;s mainly because the debian way of manage Apache confs is much more easy to handle than the upstream&#8217;s one.</p><p>In a way we&#8217;re creating Rapache for Ubuntu itself (and Debian, by reflex) rather than for Linux in general. Despite of that we&#8217;re open for people willing to help us hacking it to work on non-debian systems either.</p><p><strong>Where to find us</strong></p><ul><li>Launchpad project page: <a
href="https://launchpad.net/rapache">https://launchpad.net/rapache</a></li><li>Messy wiki page: <a
href="https://wiki.ubuntu.com/Rapache">https://wiki.ubuntu.com/Rapache</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://www.stefanoforenza.com/me-and-rapache/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Xdump: a little piece of my story as developer</title><link>http://www.stefanoforenza.com/xdump-a-little-piece-of-my-story-as-developer/</link> <comments>http://www.stefanoforenza.com/xdump-a-little-piece-of-my-story-as-developer/#comments</comments> <pubDate>Mon, 19 Feb 2007 16:56:37 +0000</pubDate> <dc:creator>Stefano Forenza</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[php]]></category> <category><![CDATA[projects]]></category> <guid
isPermaLink="false">http://devnull.dreamhosters.com/2007/02/19/xdump-a-little-piece-of-my-story-as-developer/</guid> <description><![CDATA[I am slowly beginning to pull online docs and samples for Xdump. Xdump was one debugging tool I had to develop for the reason that in some situations var_dump() simply is not enough. Here’s the overview of xdump. Of course one could say that as good programmer you should never ever findy yourself in such [...]]]></description> <content:encoded><![CDATA[<p><a
title="xdumpa-little-piece-of-my-story-as-developer" name="xdumpa-little-piece-of-my-story-as-developer" id="xdumpa-little-piece-of-my-story-as-developer"></a> I am slowly beginning to pull online docs and samples for <strong>Xdump</strong>.</p><p
class="level1"> Xdump was one debugging tool I had to develop for the reason that in some situations <a
href="http://php.net/var_dump" class="urlextern" title="http://php.net/var_dump">var_dump()</a> simply is not enough.</p><h2><a
title="section" name="section" id="section"></a></h2><p
class="level2"> Here’s the <a
href="/2007/01/23/xdump/">overview of xdump</a>.</p><p>Of course one could say that as good programmer you should never ever findy yourself in such a situation which requires something more powerful than <a
href="http://php.net/var_dump" class="urlextern" title="http://php.net/var_dump">var_dump()</a> or <a
href="http://php.net/print_r" class="urlextern" title="http://php.net/print_r">print_r()</a>. I can understand this kind of point-of-view, but I found that real world not always is like that.</p><p>Today at work, for example, I had to add some functionality to a <a
href="http://www.zen-cart.com/" class="urlextern" title="http://www.zen-cart.com/">zen-cart</a> installation. <a
href="http://www.stefanoforenza.com/xdump/zen-cart-example" class="wikilink1" title="xdump:zen-cart-example">This is something var_dump simply cannot manage</a> (without driving you crazy, I mean).<span
id="more-12"></span></p><h2><a
title="download" name="download" id="download"></a>Download</h2><p><del>I will try to make download available as soon as I can.</del></p><p><a
href="http://xdump.googlecode.com/files/xdump%2020070220.zip" class="urlextern" title="http://xdump.googlecode.com/files/xdump%2020070220.zip">Download available on google code</a></p> ]]></content:encoded> <wfw:commentRss>http://www.stefanoforenza.com/xdump-a-little-piece-of-my-story-as-developer/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Need for Cache</title><link>http://www.stefanoforenza.com/need-for-cache/</link> <comments>http://www.stefanoforenza.com/need-for-cache/#comments</comments> <pubDate>Fri, 16 Feb 2007 10:04:36 +0000</pubDate> <dc:creator>Stefano Forenza</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[php]]></category> <category><![CDATA[projects]]></category> <guid
isPermaLink="false">http://devnull.dreamhosters.com/2007/06/23/need-for-cache/</guid> <description><![CDATA[After going through PhpThumb hell, I decided to develop one serious decent caching library for caching dynamically generated images. Download &#160; Download zipped source from Google Code Or browse svn repository Download source from svn using: svn checkout http://xdump.googlecode.com/svn/trunk/ xdump Brief story One of our previous sites (about 50k page-views per day) was using a [...]]]></description> <content:encoded><![CDATA[<p>After going through <a
href="http://phpthumb.sourceforge.net/" class="urlextern" title="http://phpthumb.sourceforge.net/">PhpThumb</a> hell, I decided to develop one <del>serious</del> decent <a
href="http://code.google.com/p/cache-on-request/" class="urlextern" title="http://code.google.com/p/cache-on-request/">caching library</a> for caching dynamically generated images.<span
id="more-6"></span></p><h2><a
title="download" name="download" id="download"></a>Download</h2><p
class="level2">&nbsp;</p><blockquote><p
class="no"> Download zipped source from <a
href="http://cache-on-request.googlecode.com/files/cache-on-request-veryalpha.zip" class="urlextern" title="http://cache-on-request.googlecode.com/files/cache-on-request-veryalpha.zip">Google Code</a></p><p>Or <a
href="http://cache-on-request.googlecode.com/svn/trunk/" class="urlextern" title="http://cache-on-request.googlecode.com/svn/trunk/">browse svn repository</a></p><p>Download source from svn using: <em>svn checkout <a
href="http://xdump.googlecode.com/svn/trunk/" class="urlextern" title="http://xdump.googlecode.com/svn/trunk/">http://xdump.googlecode.com/svn/trunk/</a> xdump</em></p></blockquote><h2><a
title="brief-story" name="brief-story" id="brief-story"></a>Brief story</h2><p
class="level2"> One of our previous sites (about 50k page-views per day) was using a little php script for resizing dinamically images to thumbnail size. Since we didn’t knew in advance the size we was gonna need, resize was made at run-time.</p><p>With site’s restyling the number of resized images on every page increased sensibly. As it’s easy to guess server load went sky-high. We tried to replace the package with <a
href="http://phpthumb.sourceforge.net/" class="urlextern" title="http://phpthumb.sourceforge.net/">PhpThumb</a> but the situation got even worse (yes, worse was possible).</p><h2><a
title="what-s-wrong-with-phpthumb" name="what-s-wrong-with-phpthumb" id="what-s-wrong-with-phpthumb"></a>What&#8217;s wrong with PhpThumb</h2><p
class="level2"> I have some problems with <a
href="http://phpthumb.sourceforge.net/" class="urlextern" title="http://phpthumb.sourceforge.net/">PhpThumb</a>. Oh yes, I do.</p><ul><li
class="level1"><p
class="li"> <strong>It’s bloated</strong>. Even if PhpThumb is a class, the caching routines are written in a procedural file who reads $_GET superglobal to decide what to do. This means I had to simulate <acronym
title="Hyper Text Transfer Protocol">HTTP</acronym> request by emptying manually $_GET and putting there only values PhpThumb needs. You don’t pass through that file.. you don’t cache.</p></li></ul><ul><li
class="level1"><p
class="li"> <strong>Cache working</strong>.</p><ul><li
class="level2"><p
class="li"> Does it work? I couldn’t verify, the only thing I know is that the cache directory kept becoming bigger, with apparently no limit. Actually, it became so big to cause server load by itself.</p></li><li
class="level2"><p
class="li"> I tried disabling cache in the config. Guess what? It kept caching, yes it did! I had to <em>physically delete</em> the cache path to block caching.</p></li><li
class="level2"><p
class="li"> Cached file retrieving. It’s made using <a
href="http://php.net/readfile" class="urlextern" title="http://php.net/readfile">readfile()</a> or <a
href="http://php.net/header" class="urlextern" title="http://php.net/header">header</a> redirects. While that’s better than nothing I think we can <a
href="http://meta.wikimedia.org/wiki/404_handler_caching" class="urlextern" title="http://meta.wikimedia.org/wiki/404_handler_caching">do better</a>, much better.</p></li></ul></li></ul><h2><a
title="strategy" name="strategy" id="strategy"></a>Strategy</h2><p
class="level2"> The solution I choose is what some call <strong>generate on request</strong>. This trick consists in creating a dynamic script, making it the default <strong>Apache’s ErrorDocument</strong> for the current directory and let it handle the content generation.</p><p>The flow:</p><ol><li
class="level1"><p
class="li"> Assume we store all downloadable wallpapers on our site are stored into /image/wallpapers directory.</p></li><li
class="level1"><p
class="li"> The website’s page will contain a non existant image path. Say something like: <em> <a
href="http://example.com/dynamic/40x30/images/wallpapers/britney.jpg" class="urlextern" title="http://example.com/dynamic/40x30/images/wallpapers/britney.jpg">http://example.com/dynamic/40&#215;30/images/wallpapers/britney.jpg</a> </em></p></li><li
class="level1"><p
class="li"> At the time of the first visit to the page the resized image will not be there yet.</p></li><li
class="level1"><p
class="li"> When the image requests hits Apache, it will be redirected to our custom ErrorDocument (<em>front_controller.php</em>).</p></li><li
class="level1"><p
class="li"> <em>front_controller.php</em> will take care to read <em>/images/wallpapers/britney.jpg</em> generate our 40×30 nice thumbnail at <em>/dynamic/40×30/images/wallpapers/britney.jpg</em> path.</p></li><li
class="level1"><p
class="li"> Afterwars the user browser will be redirected to the generated image,  making it appear on the page.</p></li><li
class="level1"><p
class="li"> Every other request to the page will find the image already at the path requested, without needing <acronym
title="Hypertext Preprocessor">PHP</acronym> to do anything.</p></li></ol><h2><a
title="the-code" name="the-code" id="the-code"></a>The Code</h2><p
class="level2"> Here’s some code boxes to let you know how code looks like.</p><h3><a
title="htaccess" name="htaccess" id="htaccess"></a>.htaccess</h3><p
class="level3"> The only purpose of .htaccess here is to instruct to consider our <strong>Front Controller</strong> the default error page for the generated images path.</p><p>The first time an image is requested the Front Controller manages to create it at the requested path, and to redirect the user to it.</p><p>The following requests will find the image already waiting for them. This means the file will be served by Apache itself with no php intermediation. This can lead to performance improvement around the order of magnitude.</p><pre class="code apache"><span class="kw1">ErrorDocument</span> <span class="nu0">404</span> /dynamic/front_controller.php</pre><h3><a
title="front-controller" name="front-controller" id="front-controller"></a>Front Controller</h3><p
class="level3"> The purpouse of this file is to include libs, instantiate main class, decide which drivers are to be used and make thing run.</p><pre class="code php"><span class="kw1">include</span> <span class="br0">(</span> <span class="st0">'_libs/logger.php'</span> <span class="br0">)</span>;
<span class="kw1">include</span> <span class="br0">(</span> <span class="st0">'_libs/cache_on_request.php'</span> <span class="br0">)</span>;
<span class="re0">$FrontController</span> = <span class="kw2">new</span> GenerateOnRequest<span class="br0">(</span><span class="br0">)</span>;
<span class="co1">//decomment the following 2 lines only for debug purpouse</span>
<span class="re0">$FrontController</span>-&gt;<span class="me1">configuration</span><span class="br0">[</span><span class="st0">'debug'</span><span class="br0">]</span>=<span class="kw2">true</span>; <span class="co1">//prints logs (and hinibits header final)</span>
<span class="co1">//$FrontController-&gt;configuration['stopGeneration']=true; //checked by drivers, hinibits concrete file generation</span>
<span class="co1">//attacching drivers</span>
<span class="re0">$FrontController</span>-&gt;<span class="me1">attachDriver</span><span class="br0">(</span> <span class="kw2">new</span> ResetController <span class="br0">)</span>;
<span class="re0">$FrontController</span>-&gt;<span class="me1">attachDriver</span><span class="br0">(</span> <span class="kw2">new</span> GdImageResizer <span class="br0">)</span>;
<span class="re0">$FrontController</span>-&gt;<span class="me1">run</span><span class="br0">(</span> <span class="re0">$_SERVER</span><span class="br0">[</span> <span class="st0">'REQUEST_URI'</span> <span class="br0">]</span>, <a href="http://www.php.net/dirname"><span class="kw3">dirname</span></a><span class="br0">(</span><span class="kw2">__FILE__</span> <span class="br0">)</span> <span class="br0">)</span>;</pre><p
class="tags"><span> <a
href="http://www.stefanoforenza.com/tags/php" class="wikilink2" title="tags:php" rel="tag">php</a>, <a
href="http://www.stefanoforenza.com/tags/lib-dev" class="wikilink2" title="tags:lib-dev" rel="tag">lib-dev</a> </span></p> ]]></content:encoded> <wfw:commentRss>http://www.stefanoforenza.com/need-for-cache/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Xdump</title><link>http://www.stefanoforenza.com/xdump/</link> <comments>http://www.stefanoforenza.com/xdump/#comments</comments> <pubDate>Tue, 23 Jan 2007 16:58:38 +0000</pubDate> <dc:creator>Stefano Forenza</dc:creator> <category><![CDATA[development]]></category> <category><![CDATA[php]]></category> <category><![CDATA[projects]]></category> <guid
isPermaLink="false">http://devnull.dreamhosters.com/2007/01/23/xdump/</guid> <description><![CDATA[When working with large arrays/objects,with complex references beetween variables or (again) php’s built-in var_dump() e debug_backtrace() shows their limits. Have you ever tried to var_dump $GLOBALS ? Even if when I started this lib there were already some classes which provided nice html formatted dump, in the moment I needed one, I couldn’t (my fault) [...]]]></description> <content:encoded><![CDATA[<p><a
title="x-dump" name="x-dump" id="x-dump"></a> When working with large arrays/objects,with complex references beetween variables or (again) php’s built-in <a
href="http://php.net/var_dump" class="urlextern" title="http://php.net/var_dump">var_dump()</a> e <a
href="http://php.net/debug_backtrace" class="urlextern" title="http://php.net/debug_backtrace">debug_backtrace()</a> shows their limits.</p><p
class="level1"> Have you ever tried to var_dump $GLOBALS ?</p><p>Even if when I started this lib there were already some classes which provided nice html formatted dump, in the moment I needed one, I couldn’t (my fault) find one.<span
id="more-13"></span></p><p><strong>Xdump</strong> started as a bunch of procedural lines of code and slowly evolved in a object-oriented library which can provide <em>nice collapsable html dumps and backtraces</em>, <em>spoof references</em> (to avoid dump bloat and recursions) and <em>show source code lines</em> where dump was invoked as well as display on screen <em>source code lines for every backtrace jump</em>.</p><h2><a
title="download" name="download" id="download"></a>Download</h2><p
class="level2">&nbsp;</p><blockquote><p
class="no"> <a
href="http://code.google.com/p/xdump/downloads/list" class="urlextern" title="http://code.google.com/p/xdump/downloads/list">Xdump Download Page</a></p></blockquote><h2><a
title="overview" name="overview" id="overview"></a>Overview</h2><p
class="level2"> Xdump let’s you display php vars nicely on the screen.</p><ul><li
class="level1"><p
class="li"> Jump to examples</p></li><li
class="level2"><p
class="li"> Test cases are provided (requires SimpleTest)</p></li></ul><h2><a
title="usage" name="usage" id="usage"></a>Usage</h2><p
class="level2">&nbsp;</p><ol><li
class="level1"><p
class="li"> Include “xdump/xdump.php” in your main include file.</p></li><li
class="level1"><p
class="li"> Use following code:</p></li></ol><pre class="code php"><a href="http://www.php.net/echo"><span class="kw3">echo</span></a> xdump::<span class="me2">dump</span><span class="br0">(</span><span class="re0">$var</span><span class="br0">)</span>;</pre><ol><li
class="level1"><p
class="li"> To show a backtrace instead type:</p></li></ol><pre class="code php"><a href="http://www.php.net/echo"><span class="kw3">echo</span></a> xdump::<span class="me2">backtrace</span><span class="br0">(</span><span class="br0">)</span>;</pre><h2><a
title="samples" name="samples" id="samples"></a>Samples</h2><p
class="level2"> <a
href="http://www.stefanoforenza.com/xdump/zen-cart-example" class="wikilink1" title="xdump:zen-cart-example">Dumping get_defined_vars() inside a Zen-Cart template</a></p><h2><a
title="licence-and-contact" name="licence-and-contact" id="licence-and-contact"></a>Licence and contact</h2><p
class="level2">&nbsp;</p><ul><li
class="level1"><p
class="li"> Xdump is <acronym
title="Massachusetts Institute of Technology">MIT</acronym> Licensed.</p></li><li
class="level2"><p
class="li"> Info, suggestions and stuff to: stefano@stefanoforenza.com</p></li></ul><h2><a
title="features" name="features" id="features"></a>Features</h2><p
class="level2"> <strong>General</strong></p><ul><li
class="level1"><p
class="li"> Displays php dumps more nicely</p></li><li
class="level2"><p
class="li"> Dumps are javascript contractible. They occupy little space on the page and open when clicked.</p></li><li
class="level2"><p
class="li"> Display nicely without styles and javascript as well (if you work with them disabled)</p></li><li
class="level2">Shows file, line number and source lines around the dump invocation (no more digging around to remove debugging code). Shows source lines for every backtrace jump as well (neat! try it).</li><li
class="level2"><p
class="li"> (almost) Plug &amp; Play</p></li></ul><p><strong>Technical</strong></p><ul><li
class="level1"><p
class="li"> Handles reference recursions inside objects and arrays (no endless loop). Will signal visually nested references (the parent referenced element will blink orange).</li><li
class="level2"><p
class="li"> PHP5 Overloading aware (doesn’t touch <em
class="u">get, </em>set etc)</p></li><li
class="level2"><p
class="li"> PHP4 Compatible</p></li><li
class="level2"><p
class="li"> Shows you backtrace info and the chunk of the code that invoked the dump</p></li><li
class="level2">Some little effort to limit the size of markup inside the dump. Keep in mind that the dump will anyway be bigger than a vardump</li></ul> ]]></content:encoded> <wfw:commentRss>http://www.stefanoforenza.com/xdump/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
