<?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>Benjamin Steininger</title>
	<atom:link href="http://benjamin-steininger.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://benjamin-steininger.de</link>
	<description>Webstuff, Photos and more</description>
	<lastBuildDate>Mon, 30 Apr 2012 10:18:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Fiio E10 DAC on Ubuntu 12.04 on a Dell Latitude E6510</title>
		<link>http://benjamin-steininger.de/2012/04/30/fiio-e10-dac-on-ubuntu-12-04-on-a-dell-latitude-e6510/</link>
		<comments>http://benjamin-steininger.de/2012/04/30/fiio-e10-dac-on-ubuntu-12-04-on-a-dell-latitude-e6510/#comments</comments>
		<pubDate>Mon, 30 Apr 2012 10:18:06 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[akg]]></category>
		<category><![CDATA[akg k242HD]]></category>
		<category><![CDATA[dac]]></category>
		<category><![CDATA[e10]]></category>
		<category><![CDATA[fiio]]></category>
		<category><![CDATA[fiio e10]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu 12.04]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=46</guid>
		<description><![CDATA[Since the sound card in the Latitude e6510 is not really good, at least on linux it does not perform good - sound volume with my headphones and over the speakers is &#8230; not enough - loud stuff sounds really really crappy &#8230; <a href="http://benjamin-steininger.de/2012/04/30/fiio-e10-dac-on-ubuntu-12-04-on-a-dell-latitude-e6510/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since the sound card in the Latitude e6510 is not really good, at least on linux it does not perform good<br />
- sound volume with my headphones and over the speakers is &#8230; not enough<br />
- loud stuff sounds really really crappy</p>
<p>I was missing something, especially when listening to musik a bit louder, I wanted a little cheap boost for now to power my AKG K242 HD, nothing to expensive, I first planed for 50€ but extended the budget to 100€ and went with the E10 for about 80 €.</p>
<p>Most important it had to work on Linux without quirks or problems, so something driver less would be nice, I prefer an analog volume control instead of some buttons to turn the volume up and down.</p>
<p>As far as I can tell it works fine, attached it, switched output to it:</p>
<p><a href="http://benjamin-steininger.de/wp-content/uploads/2012/04/Sound_001.png"><img class="alignnone size-full wp-image-48" title="Sound Control on Ubuntu 12.04" src="http://benjamin-steininger.de/wp-content/uploads/2012/04/Sound_001.png" alt="" width="742" height="570" /></a></p>
<p>Not perfect, but a big step in the right direction and enough for now.</p>
<p>Multiple streams seem to be absolute no problem (playing a game while listening to music or watching a dvd).</p>
<p>I tried playing <a title="Torchlight" href="http://www.torchlightgame.com/">Torchlight</a> over <a title="STEAM" href="http://store.steampowered.com/">STEAM</a> via <a href="http://www.winehq.org/">WINE</a>, while running <a href="http://www.videolan.org/vlc/">VLC</a> and <a href="http://projects.gnome.org/rhythmbox/">Rhytmbox</a> with audio files, playing a video from <a href="http://www.youtube.com/">youtube</a> and running a tutorial video via <a href="http://projects.gnome.org/totem/">totem</a> and it work nicely (nothing I normally need but after reading that it seems some DACs have problems with more than 1 stream, i wanted to be shure it works).</p>
<p><a href="http://benjamin-steininger.de/wp-content/uploads/2012/04/Sound_002.png"><img class="alignnone size-full wp-image-49" title="Ubuntu Sound" src="http://benjamin-steininger.de/wp-content/uploads/2012/04/Sound_002.png" alt="" width="742" height="638" /></a></p>
<p>&nbsp;</p>
<p>And compared to my Galaxy Nexus it i small:</p>
<p><a href="http://benjamin-steininger.de/wp-content/uploads/2012/04/MG_0667.jpg"><img class="alignnone size-large wp-image-47" title="Samsung Galaxy Nexus next to FIIO E10" src="http://benjamin-steininger.de/wp-content/uploads/2012/04/MG_0667-682x1024.jpg" alt="" width="584" height="876" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2012/04/30/fiio-e10-dac-on-ubuntu-12-04-on-a-dell-latitude-e6510/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What can go wrong on switching application-context in symfony 1.4</title>
		<link>http://benjamin-steininger.de/2012/03/07/what-can-go-wrong-on-switching-application-context-in-symfony-1-4/</link>
		<comments>http://benjamin-steininger.de/2012/03/07/what-can-go-wrong-on-switching-application-context-in-symfony-1-4/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 09:55:50 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[csrf]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[sfContext]]></category>
		<category><![CDATA[symfony1]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=40</guid>
		<description><![CDATA[It&#8217;s was the end of my first week after the winter holidays and I noticed something strange in the working branch of the base applications backend. Most parts of this backend were based on the admingenerator. Each plugin hooks itself &#8230; <a href="http://benjamin-steininger.de/2012/03/07/what-can-go-wrong-on-switching-application-context-in-symfony-1-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s was the end of my first week after the winter holidays and I noticed something strange in the <code>working</code> branch of the base applications backend. Most parts of this backend were based on the admingenerator. Each plugin hooks itself into the backend, includes menus, configuration and has generator based CRUDs for its models.</p>
<p>Listing, editing, creating new entries all no problem.<br />
But deleting wasn&#8217;t possible in the list-view, it always showed me the errorpage of symfony, deleting an entry from the edit-page worked.</p>
<p>Switching to dev-mode showed me a csrf-warning. I cleared cleared and reset everything related to the application, deleted the sessions, restarted all services related, reset the database, created a new entry and tried to delete it &#8230; again failing.</p>
<p>Last point where it worked: before the holidays.<br />
Since I was the only developer touching the code, there wasn&#8217;t anybody else to blame.</p>
<p>Switching to another plugins generators, some had the bug, some didn&#8217;t, now it was really getting weird, since all use the same modified theme as base, configurations was nearly the same.</p>
<p>After hacking around with the generator.yml, trying everything and not getting anywhere I choose to just go back in time. Thanks to git aka version control, I went back commit by commit in a plugin which had the problem and it showed me where the problem was located.</p>
<p>The problem was introduced by what looked like a simple feature short before the holidays: Linking from the admingenerator-list to the entries in the frontend by using the frontends context.</p>
<p>After finding <a href="http://symfony-blog.driebit.nl/2011/03/accessing-the-front-end-routing-from-the-back-end-application/">Accessing the frontend routing from the backend application</a> and modifiying it a bit I used it to create columns in some generator lists which fetched the frontend-router and generated the url by using the router.</p>
<p>Everything was perfect, expect, switching back with <code>sfContext::switchTo($current_application);</code> wasn&#8217;t really enough to switch back to the backend-application. It reset sfConfig and some other things, but doesn&#8217;t call sfApplicationConfiguration-&gt;initConfiguration(); which usally runs</p>
<pre>if (false !== sfConfig::get('sf_csrf_secret'))
{
  sfForm::enableCSRFProtection(sfConfig::get('sf_csrf_secret'));
}</pre>
<p>So what you need to do is running an additional</p>
<pre>    $current_configuration-&gt;initConfiguration();</pre>
<p>after running the switchTo, else you application will use the csrf-tokens from the application you switched to and it probably has more sideaffects.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2012/03/07/what-can-go-wrong-on-switching-application-context-in-symfony-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WYSIWYG Editor for Markdown and reStructuredText on Linux / Ubuntu</title>
		<link>http://benjamin-steininger.de/2012/03/06/wysiwyg-editor-for-markdown-and-restructuredtext-on-linux-ubuntu/</link>
		<comments>http://benjamin-steininger.de/2012/03/06/wysiwyg-editor-for-markdown-and-restructuredtext-on-linux-ubuntu/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 14:30:11 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Live-Preview]]></category>
		<category><![CDATA[Markdown]]></category>
		<category><![CDATA[reStructuredText]]></category>
		<category><![CDATA[ReText]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=37</guid>
		<description><![CDATA[Because I sometimes miss a needed linebreak or my lists don&#8217;t look like expected in Markdown or reStructuredText (mainly for use with sphinx), I was looking for a better editor with some kind of live preview for linux. Normally I &#8230; <a href="http://benjamin-steininger.de/2012/03/06/wysiwyg-editor-for-markdown-and-restructuredtext-on-linux-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Because I sometimes miss a needed linebreak or my lists don&#8217;t look like expected in <a href="http://daringfireball.net/projects/markdown/">Markdown</a> or <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> (mainly for use with <a href="http://sphinx.pocoo.org/">sphinx), I was looking for a better editor with some kind of live preview for linux. Normally I edited those files directly in Netbeans or Gedit. </a></p>
<p>I found <a href="http://sourceforge.net/p/retext/home/ReText/">ReText</a> a nice Gui-Editor written in python with QT for the frontend. It does exactly what i wanted, 2 Columns, one with markdown or reStructuredText, the other shows a live preview.<br />
For Ubuntu there is a PPA:</p>
<p>https://launchpad.net/~mitya57/+archive/ppa</p>
<p>which includes integration into the menu and you don&#8217;t have to create the entry yourself to automatically open files</p>
<p>If you don&#8217;t install via the PPA you have to create the menu-entry yourself to be able to automatically open files with it since Ubuntu seems to no more support opening files with programs which aren&#8217;t installed in the menu: <a href="http://askubuntu.com/questions/67382/add-custom-command-in-the-open-with-dialog">Add Custom command in the Open with dialog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2012/03/06/wysiwyg-editor-for-markdown-and-restructuredtext-on-linux-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending Heise SocialSharePrivacy to pass a dynamic title to twitter</title>
		<link>http://benjamin-steininger.de/2011/12/07/extending-heise-socialshareprivacy-to-pass-a-dynamic-title-to-twitter/</link>
		<comments>http://benjamin-steininger.de/2011/12/07/extending-heise-socialshareprivacy-to-pass-a-dynamic-title-to-twitter/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 07:20:53 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=26</guid>
		<description><![CDATA[Yesterday I had a look at Heise SocialSharePrivacy and experimented around with it (probably will integrate it here via a plugin) but one think I was missing was a way to use it on a list of items, while having &#8230; <a href="http://benjamin-steininger.de/2011/12/07/extending-heise-socialshareprivacy-to-pass-a-dynamic-title-to-twitter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I had a look at <a href="http://www.heise.de/extras/socialshareprivacy/">Heise SocialSharePrivacy</a> and experimented around with it (probably will integrate it here via a plugin) but one think I was missing was a way to use it on a list of items, while having different titles for the twitter text, not using the current pages title. Currently it only allows for a static title or a function. But the function was worthless in this case, since I wanted to use the title each specific link.</p>
<p>An example based on their ones to describe it a bit more.</p>
<pre>&lt;div class="anriss"&gt;
    &lt;h3&gt;&lt;a href="http://www.heise.de"&gt;heise&lt;/a&gt;&lt;/h3&gt;
    &lt;p&gt;lorem ipsum&lt;/p&gt;
    &lt;div class="social"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class="anriss"&gt;
    &lt;h3&gt;&lt;a href="http://www.heise.de/security/"&gt;heise security&lt;/a&gt;&lt;/h3&gt;
    &lt;p&gt;dolor sit amet&lt;/p&gt;
    &lt;div class="social"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;script&gt;
$(".social").socialSharePrivacy({
    uri : function(context) {
        return $(context).parents(".anriss").find("h3 a").attr("href");
    }
    service : {
        twitter: {
            'tweet_text': function (context) {
                return $(content).parents(".anriss").find("h3 a").text();
            }
        }
    }
});
&lt;/script&gt;</pre>
<p>All you need to do to get it working is changing line 196 of the jQuery Plugin from</p>
<pre>text = text();</pre>
<p>to</p>
<pre>text = text(context);</pre>
<p>Now you have access to the context inside your function.</p>
<p>I just mailed it to Heise, let&#8217;s see what they thing about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2011/12/07/extending-heise-socialshareprivacy-to-pass-a-dynamic-title-to-twitter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist</title>
		<link>http://benjamin-steininger.de/2011/11/30/reflectionexception-method-phpunit_framework_warningwarning-does-not-exist/</link>
		<comments>http://benjamin-steininger.de/2011/11/30/reflectionexception-method-phpunit_framework_warningwarning-does-not-exist/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 21:32:54 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[dataProvider]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[ReflectionException]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=20</guid>
		<description><![CDATA[If you ever get ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist That may be because you are using @dataProvider and your dataProvider returns the data in an invalid way. This may be caused by forgetting one dimension in the returned array &#8230; <a href="http://benjamin-steininger.de/2011/11/30/reflectionexception-method-phpunit_framework_warningwarning-does-not-exist/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you ever get</p>
<pre>ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist</pre>
<p>That may be because you are using @dataProvider and your dataProvider returns the data in an invalid way.</p>
<p>This may be caused by forgetting one dimension in the returned array when using only a single value as parameter for the test.</p>
<p><strong><span style="color: #ff0000;">Wrong:</span></strong></p>
<pre>&lt;?php

public function myDataProvider()
{
    $data = array();

    $data[] = 'some value i want to pass as param';
    $data[] = 'another value i want to pass as param';

    return $data;
}</pre>
<p><span style="color: #339966;"><strong>Right:</strong></span></p>
<pre>&lt;?php

public function myDataProvider()
{
    $data = array();

    $data[] = array('some value i want to pass as param');
    $data[] = array('another value i want to pass as param');

    return $data;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2011/11/30/reflectionexception-method-phpunit_framework_warningwarning-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic pushing to a remote git-repository with etckeeper</title>
		<link>http://benjamin-steininger.de/2011/11/09/automatic-pushing-to-a-remote-git-repository-with-etckeeper/</link>
		<comments>http://benjamin-steininger.de/2011/11/09/automatic-pushing-to-a-remote-git-repository-with-etckeeper/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 20:04:52 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[etckeeper]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=17</guid>
		<description><![CDATA[A simple way is just to use etckeeprs hooks and create a script which does the pushing after all /etc/etckeeper/post-install.d/60vcs-commit-push #!/bin/sh set -e git push origin master And don&#8217;t forget chmod +x /etc/etckeeper/post-install.d/60vcs-commit-push]]></description>
			<content:encoded><![CDATA[<p>A simple way is just to use etckeeprs hooks and create a script which does the pushing after all</p>
<p>/etc/etckeeper/post-install.d/60vcs-commit-push</p>
<pre>#!/bin/sh
set -e

git push origin master</pre>
<p>And don&#8217;t forget</p>
<pre>chmod +x /etc/etckeeper/post-install.d/60vcs-commit-push</pre>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2011/11/09/automatic-pushing-to-a-remote-git-repository-with-etckeeper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switched to WordPress</title>
		<link>http://benjamin-steininger.de/2011/11/08/switched-to-wordpress/</link>
		<comments>http://benjamin-steininger.de/2011/11/08/switched-to-wordpress/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 21:16:50 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=5</guid>
		<description><![CDATA[I never thought I would switch to WordPress. But there were several causes why i switched from something self-developed to WordPress: Get to know WordPress better Don&#8217;t waste time inventing features wp already has Just have more time for other &#8230; <a href="http://benjamin-steininger.de/2011/11/08/switched-to-wordpress/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I never thought I would switch to WordPress.</p>
<p>But there were several causes why i switched from something self-developed to WordPress:</p>
<ul>
<li>Get to know WordPress better</li>
<li>Don&#8217;t waste time inventing features wp already has</li>
<li>Just have more time for other things</li>
</ul>
<div>So from now one, this is WordPress Zone.</div>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2011/11/08/switched-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Identifier &#8220;request_context&#8221; is not defined with silex</title>
		<link>http://benjamin-steininger.de/2011/11/08/identifier-request_context-is-not-defined-with-silex/</link>
		<comments>http://benjamin-steininger.de/2011/11/08/identifier-request_context-is-not-defined-with-silex/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 21:11:07 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[request_context]]></category>
		<category><![CDATA[Silex]]></category>
		<category><![CDATA[symfony2]]></category>
		<category><![CDATA[Twig]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=3</guid>
		<description><![CDATA[If you ever receive a message like: Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Identifier "request_context" is not defined.' in phar:///.../vendor/silex/silex.phar/vendor/pimple/lib/Pimple.php on line 12 And it is not directly about the AsseticExtension in Silex-Extensions,it is probably because some of your &#8230; <a href="http://benjamin-steininger.de/2011/11/08/identifier-request_context-is-not-defined-with-silex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you ever receive a message like:</p>
<pre>Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Identifier "request_context" is not defined.' in phar:///.../vendor/silex/silex.phar/vendor/pimple/lib/Pimple.php on line 12</pre>
<p>And it is not directly about the AsseticExtension in <a href="https://github.com/fate/Silex-Extensions/issues/1">Silex-Extensions</a>,it is probably because some of your code wants access to the url_generator &#8211; in my case it was my own Routing-Extension for twig.</p>
<p>First some background informations why it happens.</p>
<p>The problem is that some Extensions &#8211; like the url_generator &#8211; need access to the requestContext, which is defined after you have already called $app-&gt;run(); so in your bootstrap-code that probably has not happened.</p>
<p>The creation of the RequestContext is inside <em><a href="https://github.com/fabpot/Silex/blob/master/src/Silex/Application.php#L330">Silex\Application::onKernelRequest</a></em> (Line may differ &#8211; works current master).</p>
<p>There are too solutions to the problem &#8211; either you lazyload the url_generator by passing in the app instead of the url_generator and access it only when you really need it or you let Silex run your code inside <em>Silex\Application::onKernelRequest</em> by putting it in a closure as a callback to add it to the dispatcher as a listener for the SilexEvents::BEFORE-Event &#8211; which is triggered inside <em>Silex\Application::onKernelRequest</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2011/11/08/identifier-request_context-is-not-defined-with-silex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netbeans, Symfony, Xdebug and the magical file_link_format</title>
		<link>http://benjamin-steininger.de/2011/11/08/netbeans-symfony-xdebug-and-the-magical-file_link_format/</link>
		<comments>http://benjamin-steininger.de/2011/11/08/netbeans-symfony-xdebug-and-the-magical-file_link_format/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 21:09:28 +0000</pubDate>
		<dc:creator>Benjamin Steininger</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Chromium]]></category>
		<category><![CDATA[Netbeans]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[symfony1]]></category>
		<category><![CDATA[Xdebug]]></category>

		<guid isPermaLink="false">http://benjamin-steininger.de/?p=1</guid>
		<description><![CDATA[Originally I was looking for a solution to get Chromium to open Files in Netbeans directly from symfony1 stack traces, because some time ago in a video I had see how it was done for other editors. Here we have &#8230; <a href="http://benjamin-steininger.de/2011/11/08/netbeans-symfony-xdebug-and-the-magical-file_link_format/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Originally I was looking for a solution to get <a href="http://www.chromium.org/Home">Chromium</a> to open Files in Netbeans directly from symfony1 stack traces, because some time ago in a video I had see how it was done for other editors.</p>
<p>Here we have two screenshots for a symfony1 stack trace, which is shown in dev-mode when an error happens or an exception is thrown but not caught and a xdebug stack trace:</p>
<ul>
<li><a title="symfony1 error stack trace with netbeans links" href="/media/2011/images/blogentry/7/symfony1-error-stacktrace-with-netbeans-links.png">Symfony1 error strack trace with netbeans links</a></li>
<li><a title="xdebug strack trace with netbeans links" href="/media/2011/images/blogentry/7/xdebug-stack-trace-with-netbeans-links.png">And a xdebug stack trace with netbeans links</a></li>
</ul>
<p>For symfony1 to create the links you need the following in settings.yml</p>
<pre class="codeblock">all:
  .settings:
    file_link_format:       netbeans://%f?line=%l</pre>
<p>For xdebug you need to have html_errors = On in your php.ini set xdebug.file_link_format</p>
<pre class="codeblock">xdebug.file_link_format = "netbeans://%f?line=%l"</pre>
<p>The next thing we need to do is to create a new url-handler in Gnome&#8217;s gconf.</p>
<pre class="codeblock">gconftool-2 -t string --set /desktop/gnome/url-handlers/netbeans/command "/path/to/netbeansprotocol.sh %s"
gconftool-2 -t bool --set /desktop/gnome/url-handlers/netbeans/enabled true
gconftool-2 -t bool --set /desktop/gnome/url-handlers/netbeans/needs_terminal false</pre>
<p><a title="gconf editor gnome url handlers for netbeans" href="/media/2011/images/blogentry/7/gconf-editor-gnome-url-handlers-for-netbeans.png">Screenshot of the url-handler in Gnome&#8217;s Configuration Editor (<code>/usr/bin/gconf-editor</code>)</a></p>
<p>netbeansprotocol.sh will do the parsing &#8211; a snippet I found in my desktop-wiki from a search for the same problem some time ago &#8211; it probably can be done in a nicer way &#8211; but it works (for me).</p>
<pre class="codeblock">#!/bin/bash

url=$2
file=${url#*\/\/}
file=${file%?line=*}
line=${url#*line=}

/home/robo47/netbeans-7.0/bin/netbeans --open $file:$line</pre>
<p>Further Links:</p>
<ul>
<li><a href="http://xdebug.org/docs/all_settings#file_link_format">Xdebug: Documentation: xdebug.file_link_format</a></li>
<li><a href="http://www.symfony-project.org/reference/1_4/en/04-Settings#chapter_04_sub_file_link_format">The symfony Reference Book | The settings.yml Configuration File &#8211; file_link_format</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://benjamin-steininger.de/2011/11/08/netbeans-symfony-xdebug-and-the-magical-file_link_format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

