<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Ubuntu</title>
  <updated>2010-07-29T23:35:55+01:00</updated>
  <generator uri="http://framework.zend.com" version="1.10.6">Zend_Feed_Writer</generator>
  <link rel="self" type="application/atom+xml" href="http://tfountain.co.uk/blog/ubuntu/atom.xml"/>
  <id>http://tfountain.co.uk/</id>
  <entry xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <title type="html"><![CDATA[Speeding up phpMyAdmin]]></title>
    <summary type="html"><![CDATA[Here's a quick tip for speeding up phpMyAdmin when using it on a remote server. A big drain on rendering speed for the app seems to be the sheer number of theme related requests (images and stylesheet]]></summary>
    <published>2010-07-29T23:35:55+01:00</published>
    <updated>2010-07-29T23:35:55+01:00</updated>
    <link rel="alternate" type="text/html" href="http://tfountain.co.uk/blog/2010/7/29/speeding-up-phpmyadmin"/>
    <id>http://tfountain.co.uk/blog/2010/7/29/speeding-up-phpmyadmin</id>
    <author>
      <name>Tim Fountain</name>
    </author>
    <content xmlns:xhtml="http://www.w3.org/1999/xhtml" type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:p>Here's a quick tip for speeding up phpMyAdmin when using it on a
remote server. A big drain on rendering speed for the app seems to
be the sheer number of theme related requests (images and
stylesheets) the browser makes on every page load. An easy way
around this is to use the Apache module mod_expires to send an
expires header with these files, which tells the browser not to
bother requesting them again for a set period. This cuts down the
total requests by about 90%.</xhtml:p>
<xhtml:p>Firstly, make sure mod_expires is enabled:</xhtml:p>
<xhtml:pre>
sudo a2enmod expires
sudo apache2ctl restart
</xhtml:pre>
<xhtml:p>then open the phpMyAdmin Apache configuration file (by default
in located at /etc/apache2/conf.d/phpmyadmin.conf) in your text
editor of choice. You'll see an IfModule block which sets up some
php values:</xhtml:p>
<xhtml:pre>
&lt;Directory /usr/share/phpmyadmin&gt;
    Options FollowSymLinks
    DirectoryIndex index.php

    &lt;IfModule mod_php5.c&gt;
        AddType application/x-httpd-php .php

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_value include_path .
    &lt;/IfModule&gt;
&lt;/Directory&gt;
</xhtml:pre>
<xhtml:p>insert the following mod_expires block below the existing
&lt;/IfModule&gt;:</xhtml:p>
<xhtml:pre>
    &lt;IfModule mod_expires.c&gt;
        ExpiresActive On
        ExpiresByType image/gif "access plus 7 days"
        ExpiresByType image/jpg "access plus 7 days"
        ExpiresByType image/png "access plus 7 days"
        ExpiresByType text/css "access plus 7 days"
        ExpiresByType application/javascript "access plus 7 days"
    &lt;/IfModule&gt;
</xhtml:pre>
<xhtml:p>which should leave you with this:</xhtml:p>
<xhtml:pre>
&lt;Directory /usr/share/phpmyadmin&gt;
    Options FollowSymLinks
    DirectoryIndex index.php

    &lt;IfModule mod_php5.c&gt;
        AddType application/x-httpd-php .php

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_value include_path .
    &lt;/IfModule&gt;

    &lt;IfModule mod_expires.c&gt;
        ExpiresActive On
        ExpiresByType image/gif "access plus 7 days"
        ExpiresByType image/jpg "access plus 7 days"
        ExpiresByType image/png "access plus 7 days"
        ExpiresByType text/css "access plus 7 days"
        ExpiresByType application/javascript "access plus 7 days"
    &lt;/IfModule&gt;
&lt;/Directory&gt;
</xhtml:pre>
<xhtml:p>Restart Apache (sudo apache2ctl restart) so the changes take
effect.</xhtml:p>
<xhtml:p>What this does is tell Apache to send an expires header of 7
days into the future for all image, CSS and javascript files within
phpMyAdmin. The initial request after the restart will be as
before, but after that the browser knows that the files it got back
are good for 7 days, so on subsequent requests it will only request
the HTML page. You should see a noticeable speed improvement.</xhtml:p>
<xhtml:p>Normally when using mod_expires you would use a much longer
expire time than 7 days, but this way if a future phpMyAdmin update
does change these theme files you're less likely to get caught
out.</xhtml:p>
</xhtml:div>
    </content>
  </entry>
  <entry xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <title type="html"><![CDATA[BBC radio through Rhythmbox]]></title>
    <summary type="html"><![CDATA[Mainly for my own reference: It's possible to stream BBC radio through the 'radio' part of Rhythmbox (and this is preferable to the iPlayer because of Ubuntu's slightly flaky flash support). To use it]]></summary>
    <published>2008-07-20T19:50:11+01:00</published>
    <updated>2010-07-28T12:57:50+01:00</updated>
    <link rel="alternate" type="text/html" href="http://tfountain.co.uk/blog/2008/7/20/bbc-radio-stream-rhythmbox"/>
    <id>http://tfountain.co.uk/blog/2008/7/20/bbc-radio-stream-rhythmbox</id>
    <author>
      <name>Tim Fountain</name>
    </author>
    <content xmlns:xhtml="http://www.w3.org/1999/xhtml" type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:p>Mainly for my own reference: It's possible to stream BBC radio
through the 'radio' part of Rhythmbox (and this is preferable to
the iPlayer because of Ubuntu's slightly flaky flash support).</xhtml:p>
<xhtml:p>To use it just add a new 'Internet radio station', e.g. Radio 1
is: mms://wmlive-acl.bbc.co.uk/wms/radio1/radio1_nb_e1s1</xhtml:p>
</xhtml:div>
    </content>
  </entry>
  <entry xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <title type="html"><![CDATA[Layered PNGs in GIMP]]></title>
    <summary type="html"><![CDATA[I quite often receive website creative supplied in PNG format, particularly from our main designer who uses Macromedia Fireworks. Fireworks saves these by default with layers, which can be useful when]]></summary>
    <published>2008-05-06T21:16:24+01:00</published>
    <updated>2010-07-28T12:57:50+01:00</updated>
    <link rel="alternate" type="text/html" href="http://tfountain.co.uk/blog/2008/5/6/layered-png-gimp"/>
    <id>http://tfountain.co.uk/blog/2008/5/6/layered-png-gimp</id>
    <author>
      <name>Tim Fountain</name>
    </author>
    <content xmlns:xhtml="http://www.w3.org/1999/xhtml" type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:p>I quite often receive website creative supplied in PNG format,
particularly from our main designer who uses Macromedia Fireworks.
Fireworks saves these by default with layers, which can be useful
when converting layouts into HTML/CSS, but I never understood why
these layers were gone when I opened the file in <xhtml:a href="http://www.gimp.org/">the GIMP</xhtml:a>.</xhtml:p>
<xhtml:p>It turns out, the reason is because the PNG format doesn't
support layers! The <xhtml:a href="http://www.w3.org/TR/PNG/#14EditorsExt">PNG spec</xhtml:a> does allow
files to contain some 'extra data', which is apparently where
Macromedia stores the layer information (in an apparently closed
format nothing else can read). So much for the 'portable' network
graphics format.</xhtml:p>
</xhtml:div>
    </content>
  </entry>
  <entry xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <title type="html"><![CDATA[Setting up PDT 1.x, Eclipse 3.3 on Ubuntu Hardy]]></title>
    <summary type="html"><![CDATA[Not quite convinced by PHP under Netbeans, I decided to go back to the PDT plugin for Eclipse for my PHP development. Unfortunately setting this all up is much more complicated than it should be, sinc]]></summary>
    <published>2008-05-03T13:03:46+01:00</published>
    <updated>2010-07-28T12:57:50+01:00</updated>
    <link rel="alternate" type="text/html" href="http://tfountain.co.uk/blog/2008/5/3/pdt_eclipse_3.3_ubuntu"/>
    <id>http://tfountain.co.uk/blog/2008/5/3/pdt_eclipse_3.3_ubuntu</id>
    <author>
      <name>Tim Fountain</name>
    </author>
    <content xmlns:xhtml="http://www.w3.org/1999/xhtml" type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:p>Not quite convinced by PHP under Netbeans, I decided to go back
to the PDT plugin for Eclipse for my PHP development. Unfortunately
setting this all up is much more complicated than it should be,
since the current release version of PDT requires Eclipse 3.3+, but
the latest version in the Ubuntu repositories is 3.2.2.</xhtml:p>
<xhtml:p>There are alternative ways to install this of course, the PDT
site offers an all-in-one package, or you can download Eclipse 3.3
from eclipse.org, and go from there. However I've never had too
much luck with these.</xhtml:p>
<xhtml:p>So here's how to get it working:</xhtml:p>
<xhtml:ol>
<xhtml:li><xhtml:b>Install the latest version of Eclipse from the
repositories</xhtml:b> (you can do this either via. Applications &gt;
Add/Remove, via. Synaptic or via. the command line).</xhtml:li>
<xhtml:li><xhtml:b>Update Eclipse to 3.3.x</xhtml:b> using its own build-in
auto-update function. To do this:<xhtml:br/>
<xhtml:ol>
<xhtml:li>Open a terminal window and run Eclipse as root - <xhtml:tt>sudo
eclipse</xhtml:tt> (this is important as otherwise your update will fail
when it tries to overwrite some of the root-owned core files)</xhtml:li>
<xhtml:li>Add some new update sites which contain the 3.3 features (I
used the list in <xhtml:a href="http://bijayrungta.blogspot.com/2007/11/getting-eclipse-to-work-on-ubuntu.html">
this blog post</xhtml:a>), you can either add them manually or import
from the from the supplied XML file.</xhtml:li>
<xhtml:li>Select the most recent Eclipse 3.3.x version and then follow
all of the installation instructions (will take a few mins).</xhtml:li>
<xhtml:li>Exit Eclipse</xhtml:li>
</xhtml:ol>
</xhtml:li>
<xhtml:li><xhtml:b>Install PDT</xhtml:b>. Run Eclipse normally (not via. sudo), you
should get the 'Europa' splash screen, which will confirm that
you're running version 3.3.x. Help &gt; Find and install updates
etc. Select PDT and its dependencies, and install.</xhtml:li>
</xhtml:ol>
<xhtml:p>et. voila.</xhtml:p>
<xhtml:p>Hopefully the next Ubuntu release will include an Eclipse
update, which will make this process a lot easier.</xhtml:p>
</xhtml:div>
    </content>
  </entry>
  <entry xmlns:xhtml="http://www.w3.org/1999/xhtml">
    <title type="html"><![CDATA[Zend Framework in Ubuntu 8.04]]></title>
    <summary type="html"><![CDATA[Update: The packaged version of Zend Framework is currently quite out of date (5 versions behind the current release at the time of writing), so I would recommend grabbing the latest release from http]]></summary>
    <published>2008-04-27T14:42:10+01:00</published>
    <updated>2010-07-28T12:57:50+01:00</updated>
    <link rel="alternate" type="text/html" href="http://tfountain.co.uk/blog/2008/4/27/zend-framework-ubuntu-8.04"/>
    <id>http://tfountain.co.uk/blog/2008/4/27/zend-framework-ubuntu-8.04</id>
    <author>
      <name>Tim Fountain</name>
    </author>
    <content xmlns:xhtml="http://www.w3.org/1999/xhtml" type="xhtml">
      <xhtml:div xmlns:xhtml="http://www.w3.org/1999/xhtml"><xhtml:p><xhtml:b>Update</xhtml:b>: <xhtml:i>The packaged version of Zend Framework is
currently quite out of date (5 versions behind the current release
at the time of writing), so I would recommend grabbing the latest
release from <xhtml:a href="http://framework.zend.com/">http://framework.zend.com/</xhtml:a> instead
of installing using the method below.</xhtml:i></xhtml:p>
<xhtml:p>With the release of Hardy, the Ubuntu repositories now include a
package for the Zend Framework, so you can have just one copy of
the library on your server that is automatically updated. To
install and use this:</xhtml:p>
<xhtml:pre>
sudo apt-get install zend-framework
</xhtml:pre>
<xhtml:p>then add it to the include_path for your app, in a .htaccess
file:</xhtml:p>
<xhtml:pre>
php_value include_path '.:/usr/share/php/libzend-framework-php'
</xhtml:pre>
<xhtml:p>you can then require in Zend Framework classes as you need them,
or use the Zend autoloader to pull them in automatically when
instantiated.</xhtml:p>
</xhtml:div>
    </content>
  </entry>
</feed>
