<?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"
	>

<channel>
	<title>Eat my monkeydust</title>
	<atom:link href="http://eatmymonkeydust.com/feed" rel="self" type="application/rss+xml" />
	<link>http://eatmymonkeydust.com</link>
	<description>Life, PHP and Symfony - straight from the monkey's mouth</description>
	<pubDate>Mon, 04 Aug 2008 08:57:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Symfony security, sessions not cleared when logging out</title>
		<link>http://eatmymonkeydust.com/2008/08/symfony-security-sessions-not-cleared-when-logging-out/</link>
		<comments>http://eatmymonkeydust.com/2008/08/symfony-security-sessions-not-cleared-when-logging-out/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 08:57:48 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[login]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[session]]></category>

		<category><![CDATA[signout]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=36</guid>
		<description><![CDATA[I&#8217;m not sure if this will be covered in 1.1 (maybe someone can shed some light on it?) but currently when you logout using sfGuardAuth standard functionality, the session is not cleared/destroyed.
This only came to light recently, when I was scratching my head over why a parameter I had set was still available in the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure if this will be covered in 1.1 (maybe someone can shed some light on it?) but currently when you logout using sfGuardAuth standard functionality, the session is not cleared/destroyed.</p>
<p>This only came to light recently, when I was scratching my head over why a parameter I had set was still available in the $sf_params array even after logging out, and logging back in again as a <strong>different user</strong>. This threw up an interesting security issue, because I started to wonder if I&#8217;d set any admin specific parameters elsewhere which could be reused by another user on the same machine.</p>
<p>The fix is fairly straightforward, but can only be run when not in test mode, because sfBrowser does not like the session to be destroyed! Maybe this is why it has never been written into the core functionality?</p>
<p>In apps/yourapp/modules/sfGuardAuth/actions/actions.class.php</p>

<div class="wp_syntax"><div class="code"><pre class="php"> <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> executeSignout<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
   <span style="color: #66cc66;">&#123;</span>
     <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>sfConfig<span style="color: #66cc66;">::</span><span style="color: #006600;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'sf_environment'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">!=</span> <span style="color: #ff0000;">'test'</span><span style="color: #66cc66;">&#41;</span>
     <span style="color: #66cc66;">&#123;</span>
        <span style="color: #000066;">session_destroy</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #000066;">session_write_close</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #000066;">session_regenerate_id</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
     <span style="color: #66cc66;">&#125;</span>
     parent<span style="color: #66cc66;">::</span><span style="color: #006600;">executeSignout</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
   <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Adding the parent::executeSignout() line means that you can let the sfGuard plugin do the remainder of the work for you, so rather than overriding the function, you are just adding a bit to the start of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/08/symfony-security-sessions-not-cleared-when-logging-out/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Symfony generators - automatic wildcards on filters with plugins</title>
		<link>http://eatmymonkeydust.com/2008/07/symfony-generators-automatic-wildcards-on-filters-with-plugins/</link>
		<comments>http://eatmymonkeydust.com/2008/07/symfony-generators-automatic-wildcards-on-filters-with-plugins/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 10:54:13 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[filter]]></category>

		<category><![CDATA[generator]]></category>

		<category><![CDATA[wildcard]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=35</guid>
		<description><![CDATA[I was just working with a user list using an admin generator, and received a suggestion that username searches should automatically include wildcards in the searches (front and back), so it would not be necessary to add the asterisk. The problem was that the list was based on the sfGuardUser plugin, and we all know [...]]]></description>
			<content:encoded><![CDATA[<p>I was just working with a user list using an admin generator, and received a suggestion that username searches should automatically include wildcards in the searches (front and back), so it would not be necessary to add the asterisk. The problem was that the list was based on the sfGuardUser plugin, and we all know that modifying the contents of a plugin can be bad news.</p>
<p>The way to do this without modifying the plugin, is to override the action that is being called, and then call the parent method. In this case, the action that was processing the form submission was sfGuardUserActions->executeList(). So in apps/yourapp/modules/sfGuardUser/actions/actions.class.php add the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> executeList<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">//Add fields to auto-wildcard to this list</span>
    <span style="color: #ff0000">$wildcardFields</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">array</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;username&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$filters</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">getRequestParameter</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;filters&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #ff0000">$originalFilters</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$filters</span><span style="color: #66cc66;">;</span>
&nbsp;
      <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$wildcardFields</span> <span style="color: #b1b100;">as</span> <span style="color: #ff0000">$fieldName</span><span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #808080; font-style: italic;">// Only add the wildcards if the user is not already using them</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066;">strpos</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$filters</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000">$fieldName</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">===</span> <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
          <span style="color: #ff0000">$filters</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000">$fieldName</span><span style="color: #66cc66;">&#93;</span>  <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000">$filters</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000">$fieldName</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">&quot;*&quot;</span><span style="color: #66cc66;">;</span>
        <span style="color: #66cc66;">&#125;</span>
      <span style="color: #66cc66;">&#125;</span>
      <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">getRequest</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">getParameterHolder</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">set</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;filters&quot;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$filters</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
    parent<span style="color: #66cc66;">::</span><span style="color: #006600;">executeList</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">// Set the filters back to their original values before the template is rendered</span>
    <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&gt;</span><span style="color: #006600;">filters</span> <span style="color: #66cc66;">=</span> <span style="color: #ff0000">$original</span><span style="color: #66cc66;">;</span>
  <span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now the request parameters for the selected fields are automatically prepended and appended with an asterisk before calling the parent function of the same name to continue with the request. Once the parent has finished, we then set the filters back to their original value, otherwise the asterisks we added would now appear in the fields when the page is presented.</p>
<p>An enhancement to this would be to specify the auto-wildcards field in the .yml file, rather than specifying it here in the action.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/07/symfony-generators-automatic-wildcards-on-filters-with-plugins/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Symfony sfGuardUser &#8220;remember me&#8221; checkbox/cookie does not work</title>
		<link>http://eatmymonkeydust.com/2008/07/symfony-sfguarduser-remember-me-checkboxcookie-does-not-work/</link>
		<comments>http://eatmymonkeydust.com/2008/07/symfony-sfguarduser-remember-me-checkboxcookie-does-not-work/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 19:27:56 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[cookie]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[remember me]]></category>

		<category><![CDATA[sfguarduser]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=34</guid>
		<description><![CDATA[It seems that the sfGuard plugin only checks the &#8220;remember me&#8221; cookie if the user attempts to access a secure module. This is fine if your site requires a login for any access, and thus is always is_secure: on, however if you have any &#8220;public&#8221; pages which logged in and non-logged in users can access, [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that the sfGuard plugin only checks the &#8220;remember me&#8221; cookie if the user attempts to access a secure module. This is fine if your site requires a login for any access, and thus is always is_secure: on, however if you have any &#8220;public&#8221; pages which logged in and non-logged in users can access, users that have selected the &#8220;remember me&#8221; box will not be logged in automatically.</p>
<p>Solution:</p>
<p>Of course this could be fixed in the plugin, but if you do not want to (and shouldn&#8217;t) modify the plugin code directly, you can add another filter which will check the cookie. Assuming you have already installed the sfGuardPlugin, and have a &#8220;remember me&#8221; checkbox implemented, this is all you will need to do to get the automatic logins on non-secure pages:</p>
<p>in apps/yourapp/config/filters.yml add the remember me filter</p>

<div class="wp_syntax"><div class="code"><pre class="php">rendering<span style="color: #66cc66;">:</span> ~
web_debug<span style="color: #66cc66;">:</span> ~
security<span style="color: #66cc66;">:</span>
  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #66cc66;">:</span> sfGuardBasicSecurityFilter
&nbsp;
<span style="color: #808080; font-style: italic;"># generally, you will want to insert your own filters here</span>
&nbsp;
remember<span style="color: #66cc66;">:</span>
  <span style="color: #000000; font-weight: bold;">class</span><span style="color: #66cc66;">:</span> rememberMeFilter
&nbsp;
cache<span style="color: #66cc66;">:</span>     ~
common<span style="color: #66cc66;">:</span>    ~
flash<span style="color: #66cc66;">:</span>     ~
execution<span style="color: #66cc66;">:</span> ~</pre></div></div>

<p>Now create rememberMeFilter.class.php in apps/yourapp/lib<br />
This example uses Propel</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">class</span> rememberMeFilter <span style="color: #000000; font-weight: bold;">extends</span> sfFilter
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> execute <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$filterChain</span><span style="color: #66cc66;">&#41;</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// execute this filter only once, and if the user is not already logged in, and has a cookie set</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>isFirstCall<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;</span>amp<span style="color: #66cc66;">;&amp;</span>amp<span style="color: #66cc66;">;</span> <span style="color: #66cc66;">!</span><span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getUser<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>isAuthenticated<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&amp;</span>amp<span style="color: #66cc66;">;&amp;</span>amp<span style="color: #66cc66;">;</span> <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getRequest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getCookie<span style="color: #66cc66;">&#40;</span>sfConfig<span style="color: #66cc66;">::</span><span style="color: #006600;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'app_sf_guard_plugin_remember_cookie_name'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'sfRemember'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#123;</span>
      <span style="color: #808080; font-style: italic;">// See if a user exists with this cookie in the remember database</span>
      <span style="color: #ff0000">$c</span> <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Criteria<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
      <span style="color: #ff0000">$c</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>add<span style="color: #66cc66;">&#40;</span>sfGuardRememberKeyPeer<span style="color: #66cc66;">::</span><span style="color: #006600;">REMEMBER_KEY</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getRequest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getCookie<span style="color: #66cc66;">&#40;</span>sfConfig<span style="color: #66cc66;">::</span><span style="color: #006600;">get</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'app_sf_guard_plugin_remember_cookie_name'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'sfRemember'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
      <span style="color: #ff0000">$c</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>add<span style="color: #66cc66;">&#40;</span>sfGuardRememberKeyPeer<span style="color: #66cc66;">::</span><span style="color: #006600;">IP_ADDRESS</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getRequest<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getHttpHeader <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'addr'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'remote'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
      <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$resultArray</span> <span style="color: #66cc66;">=</span> sfGuardRememberKeyPeer<span style="color: #66cc66;">::</span><span style="color: #006600;">doSelectJoinsfGuardUser</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$c</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
      <span style="color: #66cc66;">&#123;</span>
        <span style="color: #ff0000">$resultRow</span> <span style="color: #66cc66;">=</span> <span style="color: #000066;">current</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$resultArray</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #ff0000">$this</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getContext<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getUser<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>signIn<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000">$resultRow</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>getSfGuardUser<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #808080; font-style: italic;">// execute next filter</span>
    <span style="color: #ff0000">$filterChain</span><span style="color: #66cc66;">-&amp;</span>gt<span style="color: #66cc66;">;</span>execute<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>That should do it, now your users will be logged in on any page if they have the cookie set. The sfGuardPlugin will still take care of setting the cookie and clearing it on logout.</p>
<p>Remember when using these cookies, it&#8217;s good practice to ask the user to re-enter their password when doing anything sensitive, like submitting an order or changing any personal details like their password.</p>
<p>A <a href="http://shiny.ma3x.net/2008/07/03/sfguardplugin-remember-me-follow-up">follow up by Shiny</a> explains that you can also get this working by securing modules with empty permission sets like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php">all<span style="color: #66cc66;">:</span>
  is_secure<span style="color: #66cc66;">:</span> on
&nbsp;
index<span style="color: #66cc66;">:</span>
  credentials<span style="color: #66cc66;">:</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span></pre></div></div>

<p>Be careful with setting that globally though if you&#8217;re trying to set a &#8220;secure it first, grant permissions later&#8221; style system, because with the above - everything is accessible until secured.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/07/symfony-sfguarduser-remember-me-checkboxcookie-does-not-work/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows Vista media player will not start</title>
		<link>http://eatmymonkeydust.com/2008/07/windows-vista-media-player-will-not-start/</link>
		<comments>http://eatmymonkeydust.com/2008/07/windows-vista-media-player-will-not-start/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 18:50:32 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[media player]]></category>

		<category><![CDATA[vista]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=33</guid>
		<description><![CDATA[I spent ages looking for  a fix for this and found many forums and many &#8220;fixes&#8221; which worked for some and not for others. Something that I installed (or maybe un-installed) managed to mess up some registered dlls, and nothing I tried from all the helpful suggestions fixed it.
Until today (type these in a command [...]]]></description>
			<content:encoded><![CDATA[<p>I spent ages looking for  a fix for this and found many forums and many &#8220;fixes&#8221; which worked for some and not for others. Something that I installed (or maybe un-installed) managed to mess up some registered dlls, and nothing I tried from all the helpful suggestions fixed it.</p>
<p>Until today (type these in a command prompt):</p>

<div class="wp_syntax"><div class="code"><pre class="php">regsvr32 jscript<span style="color: #66cc66;">.</span>dll
regsvr32 vbscript<span style="color: #66cc66;">.</span>dll
regsvr32 wmp<span style="color: #66cc66;">.</span>dll</pre></div></div>

<p>And wow, I was amazed when media player actually started! So thanks to HighConcept on <a title="The post on The Green Button" href="http://thegreenbutton.com/forums/2/164268/ShowThread.aspx" target="_blank">The Green Button</a> who offered the suggestion. I use mostly iTunes anyway&#8230; but it had become annoying with embedded media and a few other things that I was trying to achieve with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/07/windows-vista-media-player-will-not-start/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Climbing at Grefsenaasen / klatring på Grefsenåsen (Oslo) 10/07/08</title>
		<link>http://eatmymonkeydust.com/2008/07/climbing-klatring-grefsenasen-oslo-100708/</link>
		<comments>http://eatmymonkeydust.com/2008/07/climbing-klatring-grefsenasen-oslo-100708/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 13:48:28 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[climbing]]></category>

		<category><![CDATA[cecilie]]></category>

		<category><![CDATA[crag]]></category>

		<category><![CDATA[forest]]></category>

		<category><![CDATA[hill]]></category>

		<category><![CDATA[marianne]]></category>

		<category><![CDATA[torkjel]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=26</guid>
		<description><![CDATA[First of all, the main reason I&#8217;m writing this is so that first time visitors to this interesting crag, just minutes away from where I work (Storo in Oslo), will not go through the same hunting process as we did! First of all, the guide book (Klatrefører for Oslo og omegn - 2003) is pretty [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Grefsenåsen - Google earth view" href="http://maps.google.com/?ie=UTF8&amp;ll=59.956563,10.800381&amp;spn=0.00145,0.004597&amp;t=h&amp;z=18" target="_blank"><img class="alignright size-medium wp-image-27" style="float: right;" title="Grefsenåsen climbing - as seem from Google earth" src="http://eatmymonkeydust.com/wp-content/uploads/2008/07/grefsen_google.jpg" alt="Grefsen Broccoli" width="200" height="233" /></a>First of all, the main reason I&#8217;m writing this is so that first time visitors to this interesting crag, just minutes away from where I work (Storo in Oslo), will not go through the same hunting process as we did! First of all, the guide book (Klatrefører for Oslo og omegn - 2003) is pretty out of date, 5 years is a long time in a city that likes to keep building - I don&#8217;t think you&#8217;ll ever see Oslo without a crane or 6 on the skyline. Secondly, the crag is pretty well hidden - so unless you know the exact paths to take, you could well spend a few hours in the forest of dark green broccoli&#8230;</p>
<p>We approached along the road, as described by page 53, looking for a locked car park 150m from our path up the steep hill. It was ok to park along side this car park, so we were told&#8230; except it doesn&#8217;t exist any more - obliterated in what we now realise was probably the new apartment building built into the side of the hill.</p>
<p>After driving up and down the road, between the two solid way-points on the map that we knew we should be between, we settled on a small car park with what looked suspiciously like climbers&#8217; cars. Next to these cars, was a very small, steep path which wound up the hillside. Perfect. About an hour later, and a few litres of sweat, we headed back to the car.</p>
<p><a title="View from Grefsenåsen out to the Oslo fjord" href="http://gallery.walkandclimb.co.uk/galleries/2008.07.10%20-%20grefsenaasen%20klatring/target6.html" target="_blank"><img class="alignleft size-full wp-image-28" style="float: left;" title="Grefsenåsen viewpoint" src="http://eatmymonkeydust.com/wp-content/uploads/2008/07/view.jpg" alt="Grefsenåsen viewpoint" width="300" height="206" /></a>Luckily for us, it was a beautiful day, 6pm in Oslo at this time of year can be pretty warm, and it didn&#8217;t disappoint us today. We drove up to the top car park at Grefsenkollen, and after little help from some grumpy truckers, and avoiding the couple who looked like they were doing something they shouldn&#8217;t be, we (just Torkjel and I this time) headed into the forest for another look, this time attacking from above.</p>
<p>More sweat later, after zig-zagging across the hill, we eventually hit the lower road again. Still no climbing in sight! After a short jog along the road, we found what looked like a promising path up into the broccoli, so we went for it, only to end up at a solid platform with several discarded &#8220;engangsgrill&#8221; disposible barbequeues - we had found the viewpoint. Now according to our trusty guidebook, the crag was a little &#8220;<strong>up and to the left</strong>&#8221; of the viewpoint, but that turned out to be a lie&#8230; So we fetched the girls, parked up at the top car park again and led them to the viewpoint, where we enjoyed our own barbequeue and soaked up the sun and the view, and I got to play a bit with my camera.</p>
<p>During our feast, we spotted a guy who looked like he knew his way around, and Torkjel approached him to ask the ultimate question &#8220;dude, where the hell have you hidden the rocks?&#8221; (well, I wasn&#8217;t there but I imagine that&#8217;s what he said&#8230;) and he said &#8220;they are just <strong>down there, to the right</strong>&#8220;. So Torkjel took off on a little recce, and sure enough he came back with a big grin on his face, we had found the crag, and it had only taken us about 2 hours!</p>
<p><a title="Torkjel climbs as the sun sets" href="http://gallery.walkandclimb.co.uk/galleries/2008.07.10%20-%20grefsenaasen%20klatring/target58.html" target="_blank"><img class="alignright alignnone size-full wp-image-29" style="float: right;" title="Climbing as the sun sets" src="http://eatmymonkeydust.com/wp-content/uploads/2008/07/night_climb.jpg" alt="Climbing as the sun sets" width="200" height="300" /></a></p>
<p>All in all it was a great evening. We got a good workout in the forest - I love orienteering so running through trees was no chore, we had a barbequeue with a stunning view of Oslo, and we climbed 3 good routes, all before 10pm.</p>
<ul>
<li><strong>Beinbrudd </strong>- Bolted, Russ led Cecilie second, Torkjel third</li>
<li><strong>Svaet I</strong> - Traditional protection, Russ led Torkjel second, Cec third</li>
<li><strong>Svaet II</strong> - Toproped central line variant</li>
</ul>
<p>More pictures are available in the gallery at <a title="Grefsenåsen climbing, gallery" href="http://gallery.walkandclimb.co.uk/galleries/2008.07.10%20-%20grefsenaasen%20klatring/" target="_blank">gallery.walkandclimb.co.uk</a> and via Facebook for those of you looky enough to be friends <img src='http://eatmymonkeydust.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> <a title="Cecilie's blog on this day climbing" href="http://ceciliey.blogspot.com/2008/07/busy-july.html" target="_blank">Cecilie has also blogged a bit about this here</a>.</p>
<p>The crag can be easily seen on <a title="Grefsenåsen on Gulesider" href="http://www.gulesider.no/kart/map.c?ps=6&amp;companies=&amp;imgt=ORTO&amp;q=Toftes+gate++69&amp;id=a_200900&amp;n=59.958045678174&amp;s=59.9551599274531&amp;e=10.804591745612&amp;w=10.7964721064232&amp;panX=20&amp;panY=-12&amp;tool=pan&amp;scrollX=0&amp;scrollY=0&amp;zoomFactor=undefined" target="_blank">gulesider.no</a> - refer to the picture below. The yellow x is the viewpoint, the blue line is the crag, and the red circle is the approximate location of the hole in the fence that you have to crawl under to gain access to the crag! It&#8217;s easy to spot from the road if you are driving past - it&#8217;s the only part of the <a title="Picture of the hole in the fence" href="http://gallery.walkandclimb.co.uk/galleries/2008.07.10%20-%20grefsenaasen%20klatring%20(mo)/target24.html" target="_blank">huge wire fence you could imagine crawling under</a>, and has obvious erosion where many a climber has trodden before you.</p>
<p><a href="http://www.gulesider.no/kart/map.c?ps=6&amp;companies=&amp;imgt=ORTO&amp;q=Toftes+gate++69&amp;id=a_200900&amp;n=59.958045678174&amp;s=59.9551599274531&amp;e=10.804591745612&amp;w=10.7964721064232&amp;panX=20&amp;panY=-12&amp;tool=pan&amp;scrollX=0&amp;scrollY=0&amp;zoomFactor=undefined"><img class="alignleft size-full wp-image-32" style="float: left;" title="Gulesider view of important points" src="http://eatmymonkeydust.com/wp-content/uploads/2008/07/gulesider1.jpg" alt="Gulesider view of important points" width="300" height="218" /></a></p>
<p>I didn&#8217;t bother to take GPS coordinates while I was there, but my guesses from Google Earth, based on the Gulesider arial photo are as follows:</p>
<p>Viewpoint:<br />
59°57&#8242;23.94&#8243;N  10°48&#8242;0.04&#8243;E<br />
Crag:<br />
59°57&#8242;22.03&#8243;N  10°47&#8242;57.34&#8243;E<br />
Hole in the fence:<br />
59°57&#8242;24.44&#8243;N  10°47&#8242;54.06&#8243;E</p>
<p>If anyone wants to correct me on those, please feel free! I&#8217;ll be sure to verify them myself the next time we are there - but if you do spend 2 hours trying to find the crag, I hope you have as much fun as we did in the process!</p>
<p>Another point to note - which I&#8217;ll expand on next time we visit with a bit more time, is that a lot of the routes seem to be bolted now with new Petzl Limbolts. The guide book indicates that all the routes are trad&#8230; I&#8217;ll take a better look next time, and maybe save someone the trouble of taking along a lot of gear for their first visit!</p>
<p>Russ.</p>
<p><a title="Russ smiles through his legs" href="http://gallery.walkandclimb.co.uk/galleries/2008.07.10%20-%20grefsenaasen%20klatring/target70.html" target="_blank"><img class="alignnone size-medium wp-image-31" title="Russ has a rest, and smiles for the camera" src="http://eatmymonkeydust.com/wp-content/uploads/2008/07/russ_legs.jpg" alt="Russ has a rest, and smiles for the camera" width="300" height="274" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/07/climbing-klatring-grefsenasen-oslo-100708/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Vista - Photos Screen Saver has stopped working</title>
		<link>http://eatmymonkeydust.com/2008/05/vista-photos-screen-saver-has-stopped-working/</link>
		<comments>http://eatmymonkeydust.com/2008/05/vista-photos-screen-saver-has-stopped-working/#comments</comments>
		<pubDate>Sat, 10 May 2008 12:53:28 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[codec]]></category>

		<category><![CDATA[photo]]></category>

		<category><![CDATA[screen saver]]></category>

		<category><![CDATA[vista]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=25</guid>
		<description><![CDATA[Just had this problem after installing a bunch of new video codecs because an Xvid file was not playing correctly.
For the benefit of those of you who cannot link the problem to a specific event, I was lucky in that that&#8217;s all I had done beforehand. Unintalling the previous codec pack, and then installing this [...]]]></description>
			<content:encoded><![CDATA[<p>Just had this problem after installing a bunch of new video codecs because an Xvid file was not playing correctly.</p>
<p>For the benefit of those of you who cannot link the problem to a specific event, I was lucky in that that&#8217;s all I had done beforehand. Unintalling the previous codec pack, and then installing this Vista specific one has solved my problem.</p>
<p><a href="http://www.softpedia.com/progDownload/Advanced-Vista-Codec-Package-Download-55586.html">Advanced-Vista-Codec-Package-Download (Softpedia.com)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/05/vista-photos-screen-saver-has-stopped-working/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yaml (yml) file gotchas - trying to set default culture to &#8220;no&#8221;</title>
		<link>http://eatmymonkeydust.com/2008/05/yaml-yml-file-gotchas-trying-to-set-default-culture-to-no/</link>
		<comments>http://eatmymonkeydust.com/2008/05/yaml-yml-file-gotchas-trying-to-set-default-culture-to-no/#comments</comments>
		<pubDate>Fri, 09 May 2008 17:03:49 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[configuration]]></category>

		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=24</guid>
		<description><![CDATA[The yaml file parser will attempt to parse all the values, rather than taking them as they are - which in most cases is a good thing, however you must remember to use quotes when the intended output is a string, and the parser may interpret the value otherwise:

default_culture:   en
// No problem, en [...]]]></description>
			<content:encoded><![CDATA[<p>The yaml file parser will attempt to parse all the values, rather than taking them as they are - which in most cases is a good thing, however you must remember to use quotes when the intended output is a string, and the parser may interpret the value otherwise:</p>

<div class="wp_syntax"><div class="code"><pre class="php">default_culture<span style="color: #66cc66;">:</span>   en
<span style="color: #808080; font-style: italic;">// No problem, en is treated as a string </span>
<span style="color: #808080; font-style: italic;">// and /en/ is automatically added to links</span>
&nbsp;
default_culture<span style="color: #66cc66;">:</span> no
<span style="color: #808080; font-style: italic;">// Oops, no is translated by Symfony </span>
<span style="color: #808080; font-style: italic;">// the same way as false, 0 or off, giving it a boolean value!</span>
&nbsp;
default_culture<span style="color: #66cc66;">:</span> <span style="color: #ff0000;">'no'</span>
<span style="color: #808080; font-style: italic;">// That's better, now you will have the intended results.</span></pre></div></div>

<p>The same applies to any yml files that you may have &#8220;keywords&#8221; in, so try to always use quotes round everything that is not boolean, integer, etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/05/yaml-yml-file-gotchas-trying-to-set-default-culture-to-no/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yes, I am a vegetarian</title>
		<link>http://eatmymonkeydust.com/2008/05/yes-i-am-a-vegetarian/</link>
		<comments>http://eatmymonkeydust.com/2008/05/yes-i-am-a-vegetarian/#comments</comments>
		<pubDate>Wed, 07 May 2008 22:57:54 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[vegetarian]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=23</guid>
		<description><![CDATA[People ask me about being a vegetarian all the time, and ask me daft questions like &#8220;do you eat fish?&#8221;, perhaps even more so now I live in the land of Vikings and father-daughter-son-baby moose hunting safaris.
I just read this article http://www.slate.com/id/2190872 and it was almost like I&#8217;d written it myself, so if you want [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://img.slate.com/media/1/123125/122975/2180618/2190871/080607_GL_veggieTN.jpg' alt='Veggie' style='float:left;' />People ask me about being a vegetarian all the time, and ask me daft questions like &#8220;do you eat fish?&#8221;, perhaps even more so now I live in the land of Vikings and father-daughter-son-baby moose hunting safaris.</p>
<p>I just read this article <a href="http://www.slate.com/id/2190872">http://www.slate.com/id/2190872</a> and it was almost like I&#8217;d written it myself, so if you want a better understanding of me, and many millions of people like me, take a read&#8230; It&#8217;s pretty spot on <img src='http://eatmymonkeydust.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/05/yes-i-am-a-vegetarian/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Week 19&#8230;</title>
		<link>http://eatmymonkeydust.com/2008/05/week-19/</link>
		<comments>http://eatmymonkeydust.com/2008/05/week-19/#comments</comments>
		<pubDate>Sun, 04 May 2008 12:18:09 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=22</guid>
		<description><![CDATA[So week 19 of 2008 is almost upon us (thank the Scandinavians for their odd use of week numbers instead of &#8220;real&#8221; dates) and the sun is shining. That means no excuses - the running shoes need to come out at some point and the bike can&#8217;t complain about getting wet&#8230;

Monday - cycle to work, [...]]]></description>
			<content:encoded><![CDATA[<p>So week 19 of 2008 is almost upon us (thank the Scandinavians for their odd use of week numbers instead of &#8220;real&#8221; dates) and the sun is shining. That means no excuses - the running shoes need to come out at some point and the bike can&#8217;t complain about getting wet&#8230;</p>
<ul>
<li>Monday - cycle to work, then to norskkurs? Hmm, maybe I&#8217;ll have to think about that second part, since I don&#8217;t really want to be sat in a classroom smelling like I&#8217;ve just run a marathon&#8230;</li>
<li>Tuesday - Volleyball</li>
<li>Wednesday - same as Monday</li>
<li>Thursday - cycle to work, climb in evening</li>
<li>Friday - rest</li>
<li>Weekend - Hoping for some climbing/orienteering or at least get out for a run in the forest</li>
</ul>
<p>My &#8220;diet&#8221; has been going ok - finding more and more things to keep me full, but generally just relying on endless amounts of fruit, rice cakes and smoothies to keep me going during the work day! Still don&#8217;t feel 100% but cutting out the dairy has certainly helped.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/05/week-19/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pink Shadows in Ubuntu (Compiz) after upgrading to Hardy Heron</title>
		<link>http://eatmymonkeydust.com/2008/04/pink-shadows-in-ubuntu-after-upgrading-to-hardy-heron/</link>
		<comments>http://eatmymonkeydust.com/2008/04/pink-shadows-in-ubuntu-after-upgrading-to-hardy-heron/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 04:45:37 +0000</pubDate>
		<dc:creator>Russ</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[bug]]></category>

		<category><![CDATA[compiz]]></category>

		<category><![CDATA[nvidia]]></category>

		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://eatmymonkeydust.com/?p=21</guid>
		<description><![CDATA[At first I thought it was a cute effect that could be modified, but after playing around with the Compiz settings I realised this was actually a bug!
Some people have found success by installing the Nvidia drivers from their website instead of using the ones packaged with Hardy, however this also does the job nicely:

sudo [...]]]></description>
			<content:encoded><![CDATA[<p>At first I thought it was a cute effect that could be modified, but after playing around with the Compiz settings I realised this was actually a bug!</p>
<p>Some people have found success by installing the Nvidia drivers from their website instead of using the ones packaged with Hardy, however this also does the job nicely:</p>

<div class="wp_syntax"><div class="code"><pre class="bash"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xorg<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>libwfb.so
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> -s <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>nvidia<span style="color: #000000; font-weight: bold;">/</span>libwfb.so.xserver-xorg-core <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>xorg<span style="color: #000000; font-weight: bold;">/</span>modules<span style="color: #000000; font-weight: bold;">/</span>libwfb.so</pre></div></div>

<p>You are only deleting and recreating a symbolic link, so it&#8217;s nothing too drastic that you should be worried about trying. Just log out and back in again after doing it and you should see &#8220;normal&#8221; shadows which you can go ahead and edit on the &#8220;window decoration&#8221; section of the Compiz settings.</p>
]]></content:encoded>
			<wfw:commentRss>http://eatmymonkeydust.com/2008/04/pink-shadows-in-ubuntu-after-upgrading-to-hardy-heron/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
