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 : gordon.brown@number-ten.gov.uk
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
Uncategorized

Photoshop template for DVD cover artwork

Ever wanted to produce a movie style (okay Movie-ish!) DVD cover for a personal video project? Well I’ve come up with a photoshop template that allows for printing on to A4 card (and then trimming to fit) to do the insert that goes under the clear plastic on a standard DVD box. Note that this folds so the section on the left will be on the back, the middle will be the spine and the right will be – yep you guessed it – the front.
DVD Cover template thumbnail

You can either buy new DVD boxes (tesco sell them reasonably cheap) or take an old DVD case (like the ones you get with free DVD’s you get with Magazines or old game cases) and remove the existing insert replacing it with your own. If you print / trim carefully you can get it to show the label along the spine perfectly – this sometimes takes some trial and error!

This photoshop template is quite large (as its high res and designed for good quality print output) so I have zipped it up – get it by clicking this link. I’ve also exported it to JPG in case photoshop is of no use and you want the general idea. You can be as simple or as creative as you want with this basic design – I tend to throw a few stills from the video (or even better similar shots from a digital camera as they are better quality) on the case.

Hope this is useful – I am making this available for non-commerical usage only – please contact me if you are using this for profit making projects (although I’d doubt you would want to – as its not really polished enough!)

Whilst doing this I discovered mediafire.com which is where I am hosting the file from as its quite large – pretty impressive and very quick (no registration is needed which is a bonus).

Categories
Life

Married for 3 years!

Its Kat and I’s 3rd wedding anniversary today. Happy Anniversary Kat!

Top picture is when we got angaged at the top of the Eiffel tower and below is when we recently returned to Paris.

For the anniversary and as a gift to Kat I finally finished the DVD of the Honeymoon – its only taken me 3 years!! Here is some of the cover artwork:

Those that know me quite well can look forward to being bored by it the next time they pop by!!!

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
Life Travel

Trip to Paris

Have posted up my pictures from Kat and I’s recent trip to the french capital – We went on Eurostar for my birthday and stayed in a hotel with a view of Seine just down the road from the Eiffel tower (somewhat better than we went to get engaged!!)

Got some quite good shots (amongst the silly ones!) shame the weather was a bit dull.

Particularly pleased with this one of the Louvre:

Louvre Water

And of this one at Versailles:

Versailles from Lower Fountain

Will have to get a digital SLR camera one of these days!

More pictures available here and photos of our Engagement trip from a few years back are here.