Categories
Technology Ubuntu Web Development

Fix for Firefox Addons error…

If your not having any joy when installing addons in Firefox 3 (sorry can’t remember the specific error message) – but nothing seem to fix it – even re-installing) we managed to confirm the fix today at work. Note that involves completely clearing all Firefox related info (so settings, bookmarks etc will be gone)…

* Uninstall Firefox
* Then make sure that the C:\Program Files\Mozilla Firefox is completely gone
* Also clear out the C:\Documents and Settings\<<username>>\Application Data\Mozilla folder (it will probably still contain Firefox and Extensions directories)
* Re-install

Voila – you can install extensions again (like the brilliant FireBug)

This also works for Linux (had a similar issue at home with the Latest version of Ubuntu).

Categories
Open Source PHP Technology Ubuntu

Installing Zend Core PHP on Ubuntu Linux (8.04)

Warning! Techy post – if your not into Web development you’ll want to skip this one…

I’ve been wanting to try out Zend Core (Zend’s standard PHP stack / extension or “Reliable PHP made easy”) for a while but as Ubuntu isn’t officially supported I’ve held off. A problem with some code running on the Ubuntu version of PHP 5 forced my hand – I discovered that its actually not that hard to get ZC up and running on Ubuntu. Thought I’d share in case this is helpful to anyone…

  1. Download, unpack and run the ./install command as per usual
  2. I opted to stick with the version of Apache already installed (as its slightly newer than the Zend bundled one)
  3. My experience of Zend attempting to configure Apache varied – one some boxes it almost worked, others it didn’t. If you find the installer crashing out just untick the configure Apache option and try again.
  4. Once Zend Core has completed you’ll need to tweak things abit…

PHP5 Module

The ZC installer will have probably left your Apache configured with 2 LoadModule php5_module entries (one in /etc/apache2/apache2.conf – thanks to ZC and the other Ubuntu one in /etc/apache2/mods-enabled/php5.load). So you can either do a sudo a2dismod php5 to remove the Ubuntu one or modify the Ubuntu one to the following:

LoadModule php5_module /usr/local/Zend/Core/modules/apache22/libphp5.so

In fact you can be cunning here by commenting out the Ubuntu PHP5 extension and adding the ZC one in this file – allowing you to effectively switch between the 2 different extensions should you need to.

MySQL extension – if you’re using MySQL then you’ll need to watch out for the fact that the bundled MySQL extensions look for the MySQL socket file in /tmp/mysql.sock rather than the Debian / Ubuntu location which is /var/run/mysqld/mysqld.sock

In most cases changing in php.ini:

mysql.default_socket =
to
mysql.default_socket = /var/run/mysqld/mysqld.sock

Does the trick; but alas not in all cases it seems (eg MySQL PDO). Really hacky fix to this (please do let me know if you have something better – other than editing the socket in the /etc/my.cnf file) is to run a scheduled (using crontab) symlink of /var/run/mysqld/mysql.sock to /tmp/mysql.sock

To do this run: sudo crontab -e
and add the following line:

 5 * * * * ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock

And for now that works for me. If you want a copy of some of the relevant config files / snippets (including the extra bit that ZC adds to the apache2.conf) then I have zipped them up for ease.

Zend Core itself looks like a good product – being able to access to php.ini options via web based tool is pretty useful, as is knowing you are working on a consistent & tested version of PHP. Its a shame MySQL doesn’t offer a similar free / unsupported version of their MySQL Enterprise in a similar way really…

Categories
Technology Web Development

Facebook privacy issue workaround, and police using a FB app…

I’ve blogged about Facebook before here and here when I was talking about privacy; came across a couple of videos on BBC news (talking of which is really impressive the video and audio quality has vastly improved over last time I used) about facebook – one of which is about a facebook privacy flaw relating to Google applications. What they don’t tell you is how you can fix this…

If you want a workaround to prevent this then when next logged in to FB go to “privacy” option (which is top right), then “applications” then “other application”, scroll down until you see the image below:

Click to view full size version

Note that I’ve unticked the Basic Info and Personal Info (I’ve actually now unticked Work and Education too) as can’t really see why a Facebook application really needs this stuff in any case.

The other video is about a police force developing some kind of app that allows the local community to help fight crime through alerting them to crimes and related news. Thats pretty innovative and cutting edge for a Police force and is definitely food for thought for other uses in the public sector.

I’ve also changed my facebook password as realised it was the same as a couple of other sites and seeing as Facebook is probably a massive target / security risk (as makes such a juicy target) decided that it wouldn’t be good if someone got hold of my personal details AND a password I use for some other stuff (note to self: use password management and more passwords!!!).

We’re doing some ISO27001 stuff at work at the moment which is really making me re-think information security stuff…

Categories
Environment Web Development

New AEA website

Really impressed with the work my colleagues have done on the new AEA website (http://www.aeat.co.uk). This also includes the ecopath website which will be vastly expanded in due course.

AEA home pageI can’t claim to have been hugely involved (other than some bits and pieces behind the scenes) although this is partly because they kicked off the project whilst I was in Paris (talk about quick turn around!). The plan is to move it to the Silverstripe CMS in due course which will make management and updates easier.


Categories
Open Source PHP

Upgraded to WordPress 2.5.1…

This blog is now running the latest version of WordPress which offers an overhauled admin area one of the first enhancements you notice is a nice new dashboard with metrics.

WordPress 2.5.1 dashboard screenshot

Widgets management in WordPress 2.5

I’ve discovered the dynamic sidebar (which allows widgets to be added using the visual admin interface rather than editing code in the template files) and switched on the tags widget in this version (I’ve been tagging articles for a while they’ve just never shown up). See the bottom screenshot – what you can’t see is the nice drag and drop re-ordering of the widgets in the sidebar.

Some playing around was needed to get the tags looking reasonable in the sidebar. By default tags are just rendered in text or flat mode. However by changing the line 1362 in widgets.php from

wp_tag_cloud();
to:
wp_tag_cloud($args = array('format' => 'list'));

The tag cloud will then render as a HTML list which looks a bit better (until I can get around to doing some styling and turn it into a true tag cloud – where the tag words get bigger the more popular they are).

Categories
Open Source PHP Technology Web Development

MediaWiki is brilliant! Oh and so is FishEye!

Really impressed with the latest release of MediaWiki (the software that runs Wikipedia). Just upgraded the Wiki we use at work from 1.9 to 1.12 – the upgrade was pretty much problem free – some new features I’ve found useful:

  • Will now email you pages that change on your watchlist – if you give it your email address in the preferences section
  • Nice WYSIWYG editor – using the latest FCKEditor Plugin which is now hugely easier to setup (was an absolute pain and a hack to get it working before)
  • Discovered the Geshi syntax highlighting – thanks to Lorna‘s (from iBuildings) Blog

If you are looking for Wiki software (and don’t have the budget for Confluence – which looks very nice indeed) then check it out – mega easy to install and dead easy to use once you install the FCKeditor plugin (as Wiki text can be a bit of a barrier to adoption).

FishEye

Setup FishEye this week – if you have SVN or CVS then you have to check this out – has instantly made my life easier – and I think it will really help the growing dev team at AEA too…

Categories
Open Source PHP Ubuntu Web Development Zend Framework

Zend Framework to be bundled with Ubuntu Hardy (8.04)

Interesting & good news – Zend Framework is being bundled as part of Ubuntu Linux: http://devzone.zend.com/article/3232–Zend-Framework-to-be-part-of-Ubuntu

Direct link to article: http://andigutmans.blogspot.com/2008/02/zend-framework-to-be-part-of-ubuntu.html

Also found an interesting presentation on version 1.5 of the Zend Framework.

Categories
Open Source PHP Web Development

Trying out Web Forum Software (written in PHP)

Update: We have now gone for Vanilla forum which is really nice. PHP4 but has a really nice interface, next step Framework integration!

This is more for notes to myself for now – that I installed bbPress (by the same developers as WordPress that this blog runs on) and Phorum 5. To see if they are any good / worth using at work (eg will they integrate well with other web tools/the Zend/AEA Framework, how well are they written and documented, whats the licensing etc).

Dev site links and notes:
bbPress Logo

bbPress: http://blog.cronky.net/bbpress/

This integrates quite nicely with WordPress (uses the same users) would be good if it could use more of the WordPress installation stuff (eg templating). Also has a nice Poll plugin (although code for this looks a bit hacky).

Cons: PHP4 based, Doesn’t look very mature from its version number, GPL license might cause issues when integrating.

Phorum 5: http://sucrose.cronky.net/phorum/

Particularly interested in this one as it looks good / feature rich but it is also BSD licensed making it more flexible to customise and incorporate into other frameworks without having to re-release an Open Source version.

Cons: Again PHP 4 based.

Silverstripe Forum Module (need to install on dev box)

The other thing to consider is whether a dedicated tool like one of the above offers compelling advantages over the Silverstripe Forum module (although the Forum module is a bit alpha in our experience so far – but then it is at v0.1.2!)

Some benefits of the SS module include PHP5 / MVC implementation, that we are already using SS for CMS anyway…

Categories
Open Source PHP Web Development

www.travelf1.com – redone using Silverstripe

Recently re-worked the website I put together for LSA Ltd: www.travelf1.com to allow for easier updates by Lynden and the team.

It now uses Silverstripe 2.2.1 – an excellent open source Content Management System (we are using it extensively at work for “brochureware” – or sites that would otherwise be static HTML files – put together in Dreamweaver or similar).

Check it out if you are looking for a CMS – has some great features for both the end administrator (nice visual interface) and the developer (uses PHP5 and MVC).

Categories
Environment PHP Web Development Zend Framework

Latest project – London Green500 goes live

Green500 site Screenshot

London Green500 is an exciting project I’ve been working on for the last few months. The full details of the programme for the London Development Agency will go out next week.

In a nutshell its a Carbon Management program for large organisations in the London area – aimed at reducing CO2 emissions by 1.5 million tonnes over the next couple of years. Today the marketing site went live (which is mainly a Content Management System), later in the month the Customer and Administration parts will go live. This post also has a bit of an ulterior motive – getting the site into the search engines – as its brand new and I know my blog is crawled by Google etc.

From a development standpoint the Customer and Admin areas are more exciting as they are powered by the “AEA Framework” which is major initiative I have been working on since I joined AEA earlier in the year as Architect/Senior Developer. Zend Framework (and therefore PHP5) powered, with Smarty for views (of the MVC part) some nice templating and other modules to support the various projects at AEA.

When I can spare a bit more time I’ll post some more stuff on the AEA Framework. All I say for now is that at the moment I’m putting the finishing touches to what we are calling Advanced Forms. Forms that (as an Administrator) you can edit via the site right down to the field and validation level. So you can build complex multi-page forms and ultimately processes with less code – actually mostly from the site itself). We are also integrating YUI components such as the Datatable. Can’t wait to write more about it!

Update on Green500 – see http://www.londonclimatechange.co.uk/greenorganisations/making-it-happen/green500/
and http://www.london.gov.uk/view_press_release.jsp?releaseid=14873

It made it on to the BBC news site too – which is good news.