<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://pookey.co.uk/blog/feeds/atom.xml" rel="self" title="Ian P. Christian's personal blog" type="application/atom+xml" />
    <link href="http://pookey.co.uk/blog/"                        rel="alternate"    title="Ian P. Christian's personal blog" type="text/html" />
    <link href="http://pookey.co.uk/blog/rss.php?version=2.0"     rel="alternate"    title="Ian P. Christian's personal blog" type="application/rss+xml" />
    <title type="html">Ian P. Christian's personal blog</title>
    <subtitle type="html">Random witterings from pookey </subtitle>
    <icon>http://pookey.co.uk/blog/templates/default/img/s9y_banner_small.png</icon>
    <id>http://pookey.co.uk/blog/</id>
    <updated>2008-05-06T09:53:53Z</updated>
    <generator uri="http://www.s9y.org/" version="1.4-alpha1">Serendipity 1.4-alpha1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://pookey.co.uk/blog/archives/49-Outputting-from-Postgres-to-CSV.html" rel="alternate" title="Outputting from Postgres to CSV" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-05-06T09:53:53Z</published>
        <updated>2008-05-06T09:53:53Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=49</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=49</wfw:commentRss>
    
    
        <id>http://pookey.co.uk/blog/archives/49-guid.html</id>
        <title type="html">Outputting from Postgres to CSV</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  I can never remember how to output to a CSV file from postgres, and end up having to google it time and time again - so I'm making a note of it here mostly for my own use <img src="http://pookey.co.uk/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p>
<pre>
\f ','
\a
\t
\o /tmp/moocow.csv
SELECT foo,bar FROM whatever;
\o
\q
</pre>
<p>
  If a field has newlines, this will break. You can do something like this instead.....
</p>
<pre>
 SELECT foo, bar, '"' || REPLACE(REPLACE(field_with_newilne, '\n', '\\n'), '"', '""') || '"' FROM whatever;
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/48-Monitoring-Dell-SAS-5iR-RAID-with-nagios.html" rel="alternate" title="Monitoring Dell SAS 5/iR RAID with nagios" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-04-16T09:39:35Z</published>
        <updated>2008-04-16T09:39:35Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=48</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=48</wfw:commentRss>
    
    
        <id>http://pookey.co.uk/blog/archives/48-guid.html</id>
        <title type="html">Monitoring Dell SAS 5/iR RAID with nagios</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  The Dell PERC/5 shows like this under 'lspci'
</p>
<pre>
07:08.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068 PCI-X Fusion-MPT SAS (rev 01)
        Subsystem: Dell SAS 5/iR Adapter RAID Controller
</pre>
<p>
  The status of this RAID card can be read using mpt-status, in Gentoo this package is available as sys-block/mpt-status.  Here's an example of the output:
</p>
<pre>
# mpt-status
ioc0 vol_id 0 type IM, 2 phy, 148 GB, state OPTIMAL, flags ENABLED
ioc0 phy 1 scsi_id 32 ATA      WDC WD1600JS-75N 2E04, 149 GB, state ONLINE, flags NONE
ioc0 phy 0 scsi_id 1 ATA      WDC WD1600JS-75N 2E04, 149 GB, state ONLINE, flags NONE
</pre>
<p>
  The latest 'check_mpt' script can be found on <a href="http://www.nagiosexchange.org/cgi-bin/page.cgi?g=2236.html;d=1">Nagios Exchange</a>.  Download it and put it in your libexec folder, for me on gentoo its '/usr/nagios/libexec/'.  Open the file, and make sure the 'use lib' line points to the correct place.
</p>
<p>
  The script uses sudo to run mpt-status, so you'll need to modify your /etc/sudoers - adding a line like this:
</p>
<pre>
%nagios ALL=(ALL) NOPASSWD:/usr/sbin/mpt-status
</pre>
<p>
Next, you need to configure nagios, your filenames might be different from the names I use below.
</p>
<p><b>/etc/nagios/commands.cfg</b> : Note, the -c param refers to the number of disks you expect to be active.</p>
<pre>

define command{
  command_name  check_mpt
  command_line  $USER1$/check_mpt -c 2
}
</pre>
<p><b>/etc/nagios/localhost.cfg</b></p>
<pre>
define service{
  use                  local-service
  host_name            localhost
  service_description  mpt - Dell Raid
  check_command        check_mpt
}
</pre>
<p>
  Reload nagios, on gentoo, it's /etc/init.d/nagios reload
</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/47-skinning-nagios-nagios-doenst-have-to-be-ugly!.html" rel="alternate" title="skinning nagios - nagios doens't have to be ugly!" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-04-15T18:30:02Z</published>
        <updated>2008-04-15T18:30:02Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=47</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=47</wfw:commentRss>
    
    
        <id>http://pookey.co.uk/blog/archives/47-guid.html</id>
        <title type="html">skinning nagios - nagios doens't have to be ugly!</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  Nagios can be pretty, and several people I've told this too seemed surprised, so I thought I'd put a quick note here. Here is a nice theme for nagios....
</p>
<p>
  <a href="http://new.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1723.html;d=1">http://new.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F1723.html;d=1
</a>
</p>

<p>
  Unfortunately, the underlying UI is still the same horrible interface, but.... this does make a big difference to the aesthetics <img src="http://pookey.co.uk/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/46-Review-of-the-N95-and-the-Forerunner-305.html" rel="alternate" title="Review of the N95 and the Forerunner 305" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-03-28T21:02:00Z</published>
        <updated>2008-03-28T22:02:14Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=46</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=46</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
            <category scheme="http://pookey.co.uk/blog/categories/2-review" label="review" term="review" />
    
        <id>http://pookey.co.uk/blog/archives/46-guid.html</id>
        <title type="html">Review of the N95 and the Forerunner 305</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  I've had a Forerunner 305 for a while now.  On  the rare occasion I go running, I find it really useful.  At first, I thought t would be a great geeky toy that I'd get bored of - I honestly expected it would find its way into a draw and never be used again after the first couple of uses.
</p>
<p>
  However, it's actually a great running accessory, and I advise this kinda hardware to all by the most casual of joggers.  It's far too easy to run too fast when you're out running - you can set the forerunner up to beep at you when you go too fast or too slow - obviously you configure these speeds yourself.  Recently I ran a half marathon, I did virtually no training for it, and without the forerunner on my wrist making sure I didn't run too fast or too slow, I'm not sure I'd have finished!
</p> <br /><a href="http://pookey.co.uk/blog/archives/46-Review-of-the-N95-and-the-Forerunner-305.html#extended">Continue reading "Review of the N95 and the Forerunner 305"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/45-Dell-PERC-6i-and-RAID-monitoring.html" rel="alternate" title="Dell PERC 6/i and RAID monitoring" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-03-16T22:17:50Z</published>
        <updated>2008-03-16T22:17:50Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=45</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=45</wfw:commentRss>
    
    
        <id>http://pookey.co.uk/blog/archives/45-guid.html</id>
        <title type="html">Dell PERC 6/i and RAID monitoring</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  A few pointers for people trying to get Dell's PERC 6/i RAID monitoring working under Ubuntu, and any other linux for that matter.  It also applies to PERC 5/i too, and... other stuff <img src="http://pookey.co.uk/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p>
<p>
  First, visit <a href="http://linux.dell.com/">Dells Linux site</a>.  Have a poke about, see what's there. 
</p>

<p>
 Next, we need to download a tool to get information from your array.  <a href="http://www.lsil.com/storage_home/products_home/internal_raid/megaraid_sas/megaraid_sas_8480e/index.html?remote=1&locale">Download LSI's MegaRAID CLI tool for linux</a>. It comes as a .RPM, so if you're an ubuntu user, you can convert it to a .deb using alien, or convert it to a .tar.gz.
</p>

<code>
# alien --to-tgz MegaCli-1.01.39-0.i386.rpm
</code>

<p>
  You then have a CLI tool you can use to get all your data now!  For example:
</p>

<code>
# ./opt/MegaRAID/MegaCli/MegaCli64  -LDInfo -Lall -aALL | grep State
State: Optimal
</code>

<p>
One thing I spent a while figuring out was how to get the rebuild progress, so here's how:
</p>

<code>
# ./opt/MegaRAID/MegaCli/MegaCli64  -PDRbld -ShowProg  -PhysDrv \[32:1\]  -aALL
</code>

<p>
  There's also a really <a href="http://tools.rapidsoft.de/perc/perc-cheat-sheet.pdf">useful cheat sheet for common tasks</a>
</p>

<p>
  Don't forget to actually monitor this output with nagios, or  your favorite monitoring tool!
</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/44-My-non-conclusion-about-MVC.html" rel="alternate" title="My non-conclusion about MVC" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-03-05T10:28:14Z</published>
        <updated>2008-03-08T14:29:56Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=44</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=44</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
            <category scheme="http://pookey.co.uk/blog/categories/3-php" label="php" term="php" />
    
        <id>http://pookey.co.uk/blog/archives/44-guid.html</id>
        <title type="html">My non-conclusion about MVC</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  A you might has been in <a href="http://pookey.co.uk/blog/archives/43-phplondon08-the-crazy-guy-mail.html">my previous post</a> there's quite a discussion about how a lot of PHP frameworks break MVC.
</p>
<p>
  I stayed clear of commenting, as I didn't want to get drawn in, however one comment did ask what I thought, so here it is!
</p> <br /><a href="http://pookey.co.uk/blog/archives/44-My-non-conclusion-about-MVC.html#extended">Continue reading "My non-conclusion about MVC"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/43-phplondon08-the-crazy-guy-mail.html" rel="alternate" title="phplondon08 - the 'crazy guy' mail" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-03-04T09:09:37Z</published>
        <updated>2008-03-10T22:57:37Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=43</wfw:comment>
    
        <slash:comments>52</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
            <category scheme="http://pookey.co.uk/blog/categories/3-php" label="php" term="php" />
            <category scheme="http://pookey.co.uk/blog/categories/4-phplondon08" label="phplondon08" term="phplondon08" />
    
        <id>http://pookey.co.uk/blog/archives/43-guid.html</id>
        <title type="html">phplondon08 - the 'crazy guy' mail</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  As you'll know from my previous post, I was 'heckled' during the Q&A of the framework talk I did.  This wasn't aimed at me, but rather at all 3 of us on the panel, and more importantly, at 'MVC' frameworks as we commonly see them today.  <a href="http://marcus.bointon.com/archives/54-PHPLondon08-follow-up.html">Marcus Boniton</a> also mentions this incident on his blog.
</p>
<p>
  Personally, I don't think he's a crazy guy, I just like the title and find it quite amusing <img src="http://pookey.co.uk/blog/templates/default/img/emoticons/wink.png" alt=";-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p>
<p>
  I pointed the 'crazy guy' to my previous blog entry, where he replied to an author of one of the comments, and CCed me in.  I thought it was a very interesting mail, so it's included below.  I put this here with full permissions from Mike.
</p>
 <br /><a href="http://pookey.co.uk/blog/archives/43-phplondon08-the-crazy-guy-mail.html#extended">Continue reading "phplondon08 - the 'crazy guy' mail"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/42-phplondon08-My-symfony-talk.html" rel="alternate" title="phplondon08 - My symfony talk" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-03-01T17:32:36Z</published>
        <updated>2008-03-04T23:01:17Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=42</wfw:comment>
    
        <slash:comments>9</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=42</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
            <category scheme="http://pookey.co.uk/blog/categories/3-php" label="php" term="php" />
            <category scheme="http://pookey.co.uk/blog/categories/4-phplondon08" label="phplondon08" term="phplondon08" />
    
        <id>http://pookey.co.uk/blog/archives/42-guid.html</id>
        <title type="html">phplondon08 - My symfony talk</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  I talked at <a href="http://www.phpconference.co.uk/">PHPLondon Conference 08</a> yesterday.  I'm putting my slides online, here they are!
</p>

<p>
  <a href="/files/symfony.pdf">My phplondon08 symfony Presentation</a>
</p>

<p>
  I got slightly heckled, and was amazingly nervous because it was my first time talking, but I think it went well!  Apparently the audio recordings will be available at some point, I'll update this post when they are.
</p>
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/41-Nokia-Liveblog-Image-Uploading-Part-1.html" rel="alternate" title="Nokia Liveblog Image Uploading - Part 1" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-02-27T10:15:45Z</published>
        <updated>2008-03-01T17:54:32Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=41</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=41</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
            <category scheme="http://pookey.co.uk/blog/categories/3-php" label="php" term="php" />
    
        <id>http://pookey.co.uk/blog/archives/41-guid.html</id>
        <title type="html">Nokia Liveblog Image Uploading - Part 1</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  I'm calling this part 1, because I hope to follow it up at some point, although... who knows!
</p>

<p>
  I wanted to be able to upload my photos from my N95 directly to my website, and notice that S60 phones appear to have an option to upload to Flickr and Vox using the 'online services' system, so I figured adding my own shouldn't be too hard.  After a bit of googling, I found this:
</p>

<p>
  <a href="http://pookey.co.uk/files/lifeblog_posting_protocol_specification_1.0.pdf">lifeblog_posting_protocol_specification_1.0.pdf</a>
</p>

 <br /><a href="http://pookey.co.uk/blog/archives/41-Nokia-Liveblog-Image-Uploading-Part-1.html#extended">Continue reading "Nokia Liveblog Image Uploading - Part 1"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/40-Stateless-password-reset-system.html" rel="alternate" title="Stateless password reset system" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2008-02-05T15:46:33Z</published>
        <updated>2008-03-01T17:54:46Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=40</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=40</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
            <category scheme="http://pookey.co.uk/blog/categories/3-php" label="php" term="php" />
    
        <id>http://pookey.co.uk/blog/archives/40-guid.html</id>
        <title type="html">Stateless password reset system</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
It's pretty common for sites to have a password reset system on websites, which allow you to enter your email address, and have the site email you a link you can use to reset your password.
</p>

<p>
I had a specification that demanded this kind of system, however it needed to be stateless - in that I could not store any extra information.  Also, the hash could only be used once, and it was required that it needed to time out after a configurable time period.  Also, the URL must be short enough such that it can be easily copied and pasted into the address bar from an email, and doesn't wrap in the email.
</p>
 <br /><a href="http://pookey.co.uk/blog/archives/40-Stateless-password-reset-system.html#extended">Continue reading "Stateless password reset system"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/38-Getting-PHP4-to-work-along-side-PHP5-in-Ubuntu-Gutsy.html" rel="alternate" title="Getting PHP4 to work along side PHP5 in Ubuntu Gutsy " />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2007-11-21T18:32:53Z</published>
        <updated>2008-03-01T17:55:01Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=38</wfw:comment>
    
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
    
        <id>http://pookey.co.uk/blog/archives/38-guid.html</id>
        <title type="html">Getting PHP4 to work along side PHP5 in Ubuntu Gutsy </title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I got PHP4, compiled it as CGI.. here's how.</p>

<p>Install required packages</p>
<pre>
  apt-get install make libmysqlclient15-dev libmcrypt-dev libxpm-dev libpng12-dev \
libjpeg62-dev libcurl4-openssl-dev apache2-dev  gcc bison flex
</pre>
<p>configured as follows.</p>

<pre>
./configure --enable-force-cgi-redirect --disable-cli --enable-discard-path  \
 '--prefix=/home/pookey/php/' '--with-xml'  '--enable-bcmath' '--enable-calendar' \
 '--with-curl' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' \
  '--with-xpm-dir=/usr/X11R6' '--with-mcrypt' '--enable-magic-quotes' \
 '--with-mysqli' '--with-mysql=/usr' '--with-openssl' \
  '--enable-discard-path' '--with-pear' '--enable-sockets' \
 '--enable-track-vars' '--enable-versioning' '--with-zlib'
</pre>
<p>
This installed it into /home/pookey/php
</p>
<p>
Enabled per vhost using the following syntax
</p>
<pre>
  SetEnv PHPRC /home/pookey/php/lib/stage
  ScriptAlias /php4-cgi /home/pookey/php/bin/php

  &lt;Location /&gt;
    Action php4-script /php4-cgi
    AddHandler php4-script .php
  &lt;/Location&gt;
</pre>

<p>
For some stupid reason I failed to figure out, doc_root needs to be set to the document root for each vhost, and can only be done in php.ini (setting PHP_DOCUMENTATION_ROOT with SetEnv failed).  This means each vhost needs it's own php.ini, which is placed wherever you set PHPRC to.</p>
<p>Using this system, you can have PHP4 and PHP5 mixed even on the same vhost</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/37-Trac-and-googlebot,-a-crafty-trick!.html" rel="alternate" title="Trac and googlebot, a crafty trick!" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2007-10-29T22:58:59Z</published>
        <updated>2008-03-01T17:55:12Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=37</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
    
        <id>http://pookey.co.uk/blog/archives/37-guid.html</id>
        <title type="html">Trac and googlebot, a crafty trick!</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  I noticed that google was going crazy indexing <a href="http://doctrine.pengus.net/trac">trac for doctrine</a>.  Today it downloaded over 90000 pages, transfering 3 gig of data!  It was causing quite a bit of load on the server (not huge amounts, but enough to show in my graphs!)
</p>

<p>
  Eventaully , I came up with a nice little trick for reducing the number of hits google will make against a trac install.  Google have extended robots.txt to allow some slightly improved pattern matching.  Here's my snippet, if you don't understand it, please don't use it.
</p>

<pre>
User-Agent: Googlebot
Disallow: /*?rev*
</pre> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/36-resizing-a-ext3-disk-image.html" rel="alternate" title="resizing a ext3 disk image" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2007-10-23T10:27:12Z</published>
        <updated>2008-03-01T17:55:27Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=36</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=36</wfw:commentRss>
    
            <category scheme="http://pookey.co.uk/blog/categories/1-geek" label="geek" term="geek" />
    
        <id>http://pookey.co.uk/blog/archives/36-guid.html</id>
        <title type="html">resizing a ext3 disk image</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
Took me a while to figure this out, so thought I'd put it here for others. This is useful for Xen setups, where you use a file for the disk image.  AFAIK, you can only  grow an image, not shrink it.
</p>

<pre>
# dd if=/dev/zero bs=1M count=1024 >> disk.img
# e2fsck -f disk.img
# resize2fs disk.img
# e2fsck -f disk.img
</pre>

<p>
  This makes the disk image bigger, checks the image, resizes the file system, and then checks it again
</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/35-Finally,-Namespaces-in-PHP.html" rel="alternate" title="Finally, Namespaces in PHP?" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2007-10-02T09:15:33Z</published>
        <updated>2007-10-02T09:15:33Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=35</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=35</wfw:commentRss>
    
    
        <id>http://pookey.co.uk/blog/archives/35-guid.html</id>
        <title type="html">Finally, Namespaces in PHP?</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  <a href="http://blog.agoraproduction.com/index.php?/archives/51-Namespaces-has-PHP-5.3-Or-the-other-way-around.html">Check out this blog post</a>.  Looks promising, PHP might finally get name spaces, and somehow, they have managed to use the '::' separator!  Great news, but I'm not going to believe it till I see it released, even though it's been checked into SVN already <img src="http://pookey.co.uk/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://pookey.co.uk/blog/archives/34-Symfony-SVN-mirror.html" rel="alternate" title="Symfony SVN mirror" />
        <author>
            <name>Ian P. Christian</name>
                    </author>
    
        <published>2007-09-29T23:07:53Z</published>
        <updated>2007-09-29T23:07:53Z</updated>
        <wfw:comment>http://pookey.co.uk/blog/wfwcomment.php?cid=34</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://pookey.co.uk/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    
    
        <id>http://pookey.co.uk/blog/archives/34-guid.html</id>
        <title type="html">Symfony SVN mirror</title>
        <content type="xhtml" xml:base="http://pookey.co.uk/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  The symfony SVN is pretty unstable, and it's anoying <img src="http://pookey.co.uk/blog/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />
</p>
<p>
  Here's a mirror!  
</p>
<p>
  <a href="http://symfony.pengus.net">http://symfony.pengus.net</a>
</p>
 
            </div>
        </content>
        
    </entry>

</feed>