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
Gadgets Wireless

Opera Mini Web Browser on the BlackBerry…

…is brilliant, miles better than the standard Web Browser, although still not quite on a par with the iPhone (but then half the magic of that is the touch screen interface). Very fast and displays pages like a standard desktop browser, but the killer feature is that it allows you to see the whole website in a zoomed out view allowing you can click to zoom in/out and then move around the page really easily. Also has a handy bookmarks sync feature (where you can enter URLs online using your desktop browser for use later on the phone).

Grab it from http://mini.opera.com (using the standard browser on the phone). You can also check out a demo on PC here: http://www.operamini.com/demo/. This is also available for other devices other than BlackBerrys.

Getting the Wifi to work can be a bit fiddly (not the initial Wifi Connection but getting the device to use the WLAN rather than the GPRS). Look for options along the lines of “Prefer Wifi” in the phone settings menus.
Opera Mini behaves much better in this respect than the standard browser.

Was also very pleased to discover that I could buy a Sandisk 2GB microSD memory card for my BlackBerry for £6 on play.com! Brilliant deal! Also discovered that Sandisk do a really cool SD card that folds in half to allow it slot into your USB port so that has joined my gadget collection too!

Categories
Cycling Gadgets

New kit!

Prescription Oakleys…
Oakleys - hmmm...

Those of you are lucky(?!) enough to know me will know that I love a good gadget or 20. I took the plunge recently and bought myself some Oakleys with prescription lenses – some Livestrong Flak Jacket XLJ’s. The reason I’ve been wanting to get some (Oakley’s) for the last 5 or so years is for my cycling and skiing but haven’t got any because they are so damn expensive with prescription lenses in (about double the price standard price of Oakleys!). Of course it rains the whole weekend that I get them so I have yet to really wear them in anger…

One thing to note about prescription lenses in Oakleys is that they aren’t thinned (I’ve got thinned lenses in my regular glasses over the last few years as I’ve started getting more short sighted) so the lenses are quite thick. But they are wrap around so you get the feeling you can properly see (including peripheral vision) again (like wearing contacts – but I never got on with those). I’ll try and remember to take a picture for comparison next time I am with my 20:20 vision cycling mates.

Blackberry – aka “Crackberry” – as my former colleagues at 7city used to call them – as in they are addictive : – )

Work have been kind enough to ease my email (and keeping an eye on things) burden with a Blackberry 8820 which is nice. Has Wifi which is pretty useful. No doubt I’ll be posting some Blackberry related posts soon…

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
Technology

Bye bye old www.cronky.net website

I’ve been thinking about ditching my old HTML based website for a while now as its seriously out of date (parts of it where quite embarrassing – comments from almost 10 years ago when I seemed to be very opinionated about random stuff) and I am really pleased with WordPress. So this blog is now my main presence on the web.

Categories
Life Technology

Funny blog spam

Quite amused by this bit of blog spam:

A new comment on the post #47 “Work on the real Oliver’s Yard is underway!” is waiting for your approval

Author : Gordon Brown (IP: 90.207.167.2xx , 5acfa7xx.bb.sky.com) E-mail : [email protected]
URL : http://www.the-prime-minister.gov.uk

Comment:
Oli, I love your blog, so enlightening. One complaint – it has been over a year and STILL NO F***ING TREES – WHERE ARE THE TREES?

Sometimes its difficult to know whether this is someone messing about or Spam!

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
Sony Stuff Technology

One less Vista Machine!

I’ve lost patience with Vista and have gone back to Windows XP on my Vaio (using the Sony recovery DVDs which actually work pretty well!) as even Vista SP1 didn’t seem to fix much!

I’m going to be dual booting with the newly released version of Ubuntu which is 8.04 “Hardy Heron” I am trying to make the switch over to Linux on the desktop but there are somethings I miss. I am also going to try VirtualBox which is Open Source Virtual Machine software (like VMware) which seems to be backed by Sun Microsystems…

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…