• Default
  • Foliage
  • Clouds
  • PHPNW Group

    DelegateJohannaAlexMikeLornaJane Talks About Joel And His TestKevlin Henney (Or Maybe Not)SaraKat and SaraSteveRob and Derick

Changed blog software from Serendipity (s9y) to Wordpress

This blog has been neglected far to long / often, partly because things are always so busy and partly the company and my personal twitter accounts seem to have taken over. However there’s another reason, that I think I’d outgrown the Serendipity (s9y) software due to having more exposure to WordPress these days. I also noticed recently that there’s a WordPress app for the iPhone which was the final thing that convinced my to switch software as I’ve always got my iPhone with me and am therefore far more likely to bash out a draft on there before post-editing at the PC (in fact that’s what I did for this post!).

So having decided to switch I set about investigating the ‘how’ to do that and came across two useful resources that highlighted how it might be done:
Technosailor.com has the actual download for the WordPress import script for Serendipity and e-mats.org showed a little bit more of the detail of what to do with it.

The importer worked well in the main, first importing Categories, Users and then posts. However it failed to put the posts in any categories (other than the WordPress default of Uncategorised) and didn’t bring any of the post tags across. So those elements ended up being a manual cut-’n'-paste job, which took about half an hour or so. Another gotcha with the import is that if you’ve deleted posts / categories / authors etc. from your Serendipity blog, there will be gaps in the database Id numbers, the importer just inserts the next counted value rather than the Id of the post, category or author – this obviously has a major impact on the search engine profile of your site and the user experience resulting in the dreaded 404 errors if a user clicks through from a search engine. For posts, I manually sorted the Id numbers and for the rest I used the .htaccess method discussed next.

Then I moved on to the RewriteRules in the apache .htaccess file as discussed in the e-mats.org post (see above), however the RewriteRules they suggest are somewhat over simplistic and at least one of them simply didn’t work. So I hand crafted a few of my own that whilst being more complete are not a total resolution, they will however cover most scenarios from a standard Serendipity set up to a standard WordPress set up:

RewriteEngine On
RewriteBase /
RewriteRule ^archives/([0-9]+)\-.*.html$ /index.php?p=$1 [L,R=301]
RewriteRule ^archives/([0-9]{4,4})/([0-9]{2,2}).*.html$ /index.php?m=$1$2 [L,R=301]
RewriteRule ^archive$ / [L,R=301]
RewriteRule ^feeds/index.rss2$ /index.php?feed=rss2 [L,R=301]
RewriteRule ^feeds/index.rss1$ /index.php?feed=rss [L,R=301]
RewriteRule ^feeds/index.rss$ /index.php?feed=rss [L,R=301]
RewriteRule ^feeds/index.atom$ /index.php?feed=atom [L,R=301]
RewriteRule ^plugin/tag/(.*)$ /index.php?tag=$1 [L,R=301]

Which covers Archives, RSS feeds and article Tags, however there’s still Categories and Authors to deal with, which if you remember had database Id mapping to be done. So for Categories you probably need to be adding 2 to the Id that would have been found in the Serendipity set up due to the standard WordPress ‘Uncategorized’ and ‘Blogroll’ entries:

RewriteRule ^categories/(1)\-.*$ /index.php?cat=3 [L,R=301]
Simply repeat that line in your .htaccess file replacing the Id in the brackets (from Serendipity) and after the cat= with the appropriate Id from WordPress.

And similarly for Authors:

RewriteRule ^authors/(1)\-.*$ /index.php?author=2 [L,R=301]
where again the bracketed number is the Serendipity Id and the WordPress Id is added after the equals sign.

All in all, it’s a little more work however it’s a much more complete mapping and should catch the long tail entries and keep a lot more of your SEO benefits from your old blog software. Talking of SEO benefits, it’s perhaps worth pointing out what the elements in the square brackets at the end of each rule means. The ‘L’ tells apache it’s the last rule to apply now we’ve found a match. Most importantly for SEO the ‘R=301′ tells apache to issue a 301 RedirectPermanent header, which is the way to tell the search engines that an item has permanently moved, over time Google et al will pick up on the fact that things have moved around and update their cached records for your site and update their results – win :)

If there’s anything you can add or have gained from this feel free to post a comment for others to benefit from – thanks.

YuuGuu on Linux x86_64 (64bit) CPUs

Here at Solution Perspective we use YuuGuu quite a lot, especially with some of our clients, for remote screen sharing and to check out that we’re all talking about the same things or to take control of their screens to sort an issue out. We also happen to use Linux (Fedora in particular) a lot, and several of our machines are 64bit (x86_64 processors). For quite some time we’ve had to use, the fairly brilliant Linux – Windows layer called Wine to get YuuGuu to run on our Linux boxes.

Well no more! YuuGuu have released a native Linux version, available for Ubuntu, Fedora and Suse flavours (which can probably be coaxed to work on other distributions as well). This works fine for i386 (32bit) CPUs but not on our machines with the 64bit ones.

After a bit of digging and playing about, we’ve found they’ve also got native 64bit versions in testing and that works well, so there’s no more need for us to use Wine in order to run this very useful screen sharing application – life’s a little less complicated now. ;)

PHPNW08: Post PHP conference blast

On Saturday 22nd November I was in Manchester at Manchester Central (formerly GMex) for the first UK PHP conference outside of London: PHPNW08. The conference started as an idea back in February this year and went from concept to reality over the summer months as the PHP North West (PHPNW) user group was formed and started it’s first meeting in July.
phpnw08 PHP Conference 22/11/2008

I managed to rope everyone in, Priscilla, Emma, Mat & Phil along with Bridget on the day and David keeping the dogs happy while we were in conference mode, thanks to all for playing their parts. All in all as a company we’re very proud of what we’ve managed to pull off, all the hard work and planning has paid off, almost universally the feedback has been excellent with many people saying, to us directly, it was the best organised community conference they’d been to for years.

Sitting in the first session, K.I.S.S from Derick Rethans, I was aware of a very surreal feeling – the conference was actually happening, after months of planning, a little heartache and juggling some of the risky elements, it was actually happening right here, right now!

One of the main drivers behind PHPNW08 was to encourage junior developers to take an active path to their continuing professional development, with speakers sessions covering topics like MySQL EXPLAIN Explained and Regular Expression Basics being warmly received by many I think we achieved that objective!

My personal favourite session was Zoe Slattery’s ‘Index and Search, options for PHP programmers’ which was a really interesting comparison of the Lucene search implementations in PHP and Java – not what the title suggested but a well delivered, complex subject delivered in an easy confident manner.

It was also good to have some fun at the socials on the Friday and Saturday night, even if I didn’t quite manage to find any time to play on Mario Kart – with the open bar and food on the Saturday event it seemed to be a great way to round off the event.

While we still have to deal with some of the wrap up elements of the conference, videos, slides, handing out the last remaining prizes – the general aftermath of a very satisfying weekend, we’re already looking forward to early planning for next years’ event, PHPNW09 everyone?!

Solution Perspective Media Supports PHP North West Conference 2008

Solution Perspective Media is proud to announce that it is supporting the first annual PHP Conference in the North West, phpnw08 on 22nd November 2008.

phpnw08 is a one day conference for developers, designers, managers and anyone else with an interest in the PHP programming language. The conference will have a range of well known and local speakers with the aim of highlighting current best practice and emerging topics within the sphere of PHP and web development.

The event offers an opportunity for developers and those involved with PHP across the North-of-England to come together to discuss developments, innovations, techniques and the challenges faced in PHP and internet development.

The conference will feature high profile speakers within the PHP community, workshops and networking opportunities. Some of the key areas of focus this year are: Enterprise PHP, What’s new in PHP 5.3 and innovative solutions for a commercial world.

In addition to organising the event, Solution Perspective Media has worked in partnership with a number of sponsors including iBuildings, nti Leeds, Allegis Group, Pale Purple and Plusnet to provide an exciting program of speakers, networking and social activities.

The conference takes place on 22nd November 2008 at Manchester Central (formerly GMex) – http://www.manchestercentral.co.uk

Those involved in PHP are invited to connect and network with other PHP professionals on the following groups:

Google Groups – http://groups.google.com/group/phpnw
Facebook- http://www.facebook.com/group.php?gid=17897252075
LinkedIn – http://www.linkedin.com/e/gis/112906/3FCE41597A1B
Twitter - http://twitter.com/PHPNW

For more information or to attend the conference visit http://conference.phpnw.org.uk/phpnw08/

Catch up, social networking, new staff …

It’s been ages since I’ve blogged, partly since I’ve continued to keep up with twitter.com, which is a little like blogging but in text message size bites – some call it your life between blog posts. We’ve included a feed on the right hand side of this site or follow me or Priscilla directly.

Along with twitter, we’ also got into Facebook over the summer, it’s a little addictive and generally more fun than watching the telly! However, if some people are to be believed it could turn us all into narcissists!

We’ve also another member of staff to welcome aboard, Mathew Griffin who joined us in July, to help grow our PHP programming team. Mat’s learning how we do things round here by diving in at the deep end – it’s a good job he likes it that way as we’ve been continuing to work non-stop on a major invoicing and payroll system. So Mat is now brushing up on ZendFramework, YUI, ADOdb and XTemplate – so far so good, I just have to remember it’s a tall order to get that lot under your belt ;)

Anyway that’s the catch up, well almost…

777 file permissions not a solution for those without knowledge

Got a call today from one of our customers suppliers, a marketing company, who were trying to upload some blog software and wondered why their account quota had maxed out. The implication was that we’d set the quota too low (already at ~750Mb).

After some investigation, it turns out that the blog software in question had several run-away apache processes – chewing CPU cycles like they were going out of fashion and filling up the apache logs faster than quota could be allocated (e.g. read a Gb every couple of seconds!)  as the particular script looped and couldn’t read from the file it wanted. The cause of this was to do with file permissions, in particular one file was empty and a bug in the blog code meant that it was in an infinite loop, several times over as the user kept reloading the screen! The marketing company bod was kind enough to point out that they had it working on other servers quite happily, even initially having the cheek to make out like it was software they had written, when in actual fact it was an open source (GPL licensed) piece of software.

So after working this out and telling them they needed to read their documentation and fix the problem, they instead set all the files and folders to world writable (e.g. 777 file permissions) in their FTP client. At this point I decided that it was simpler to fix the issue myself whilst giving them a lecture on how 777 permissions is never a blanket solution to anything. I got to the point of telling them I’d just remove the software if they were going to leave it like that which they didn’t seem too happy about.

So after setting all the permissions back to what they should have been, 644 for files and 755 for directories, I then set the two or three folders that needed different permissions to be owned by the web server process. Hey presto! It all worked as expected. The marketing company bod was happy the situation was solved, however not even a word of thanks. Here’s guessing they’ll just simply 777 everything again next time they come across any snags rather than bothering to ask for some simple assistance! Oh well, some folk are dangerous when it comes to computers! If only their clients knew how incompetent they are, the world would be a better place as they’d avoid them!

Rant over, for today at least ;)

Traffic alerts via Twitter mashup with optional SMS

As a recent fan of twitter (you can follow me if you like) as a short (read text message length) form of blogging, I was quite interested to spot a blog post from Andy Davies about using twitter to mashup with traffic data feeds. I used his technique, though in a simpler format e.g. I didn’t bother with the Yahoo! Pipes element, to create a traffic alerts feed. As we’re in the Northwest of England, I wanted to use a traffic feed relevant to this locale. To this end, I used the Northwest UK RSS feed from the Highways Agency traffic feed list.

So let’s cut to the chase, how do I do this? In a nutshell: Create a new twitter account; link that to a twitterfeed.com account (a service that turns RSS feeds into twitter posts) and an RSS feed; then follow in your normal twitter account the new twitter account just created and, if you want text alerts of the data (e.g. when you’re actually travelling round the area), turn on device updates for the following of the new account (assuming you’ve already registered a mobile device for this purpose in your main account).

Then you get new tweets and or text alerts each time there’s a new RSS entry in the source feed. Sweet :)

If you want to subscribe to the results for that feed simply skip all the setup above and just follow NWUKTrafficAlrt in your twitter account.

We’re hiring

In case you’ve not noticed on our main site, we’re hiring – a PHP web developer (OOP).

Conference experience

I’m currently sat in the PHP London 08 conference and just thought I’d post a note. I’m currently listening to Rob Allen enthuse about the Zend Framework in the ‘my framework is better than yours’ session.The three frameworks under discussion where Code Igniter, Symphony and Zend Framework. Having listened to all the debates, I’m still glad we’ve settled on the Zend Framework for our day to day work, just seems more flexible for existing and new projects at the same time – the others seem only to have relevance when starting from scratch.

The morning sessions in the main track seemed a little basic over all, however you have to pitch at a wide audience level so that’s to be expected. Fortunately, Marcus Bointon after lunch (which was really quite nice for a conference) talked about mail() and all the things that go with that, handling bounces, VERP and a few other niceties. It was unfortunate that he ran out of time towards the end as it turned out to be informative and quite in depth without getting to the point of boredom – I’ve found his slides on-line which should help finish the learning.

phplondon08: Conference approaches

I’m now looking forward to the 3rd annual UK PHP conference this Friday. I went to the conference the first year it ran and it was good to truly geek about the language, I couldn’t make last year as I was on my way back from Australia (was actually between Syndey and Dubai at the time!) so I’m over-ready for another PHP geek dose.

My only problem now is deciding which track to follow on the day – choice is sometimes not a good thing! ;) Perhaps the sessions will be videoed and I can see all of it.

While I’m in PHP geek mode (I am every day but that’s what I get paid for), I’ve just discovered the PHP Podcasts web site – I’ve got that linked in the feed reader and am already starting to enjoy the aggregated content.