Archive for the 'Open Source' Category

Solved: WP Recent Posts: “Post-Plugin Library missing”

Tuesday, August 5th, 2008

Some of you may have noticed the above message appearing where my recent posts should have been for the last week or two.  It turns out the “Post-Plugin Library missing” message can be fixed by downloading the latest copy of the Post-Plugin Library (shocking, I know).

I can’t remember if I upgraded Wordpress or the Recent Posts plugin or both, but I’m guessing it was an upgrade to the Recent Post plugin that caused the problem. The new version requires a “Post-Plugin library” (written by the same guy).

(more…)

nerd. links – LDAP Browser

Tuesday, July 1st, 2008

Had a bitch of a day today in work, with an application I was playing with refusing to play with Active Directory (largely because I’ve never used LDAP before and couldn’t figure out the weird bloody syntax).

So I’d really like to offer a quick thank you to Jarek Gawor for developing (and releasing) his LDAP Browser/Editor which let me double check that I was connecting to the right server/port and play with the settings enough that I eventually got it sussed. Great wee Java tool.

Screenshot of LDAP Browser/Editor

Big PHP Niggle

Friday, June 20th, 2008

I need a quick bitch.

I love PHP. It’s everywhere. All my sites are written in it. My CMS is written in it. My blog engines, Wordpress and b2evolution, are written in it. It’s free. It runs on any platform. Hosts all support it. With PHP 5 they’ve even done a lot of work on PHP4’s main downfall – lack of OOP support.

One thing really pisses me off though – it’s totally inconsistent.  Consider these two functions:

  1. strstr — Find first occurrence of a string
  2. in_array — Checks if a value exists in an array

Take a close look. See the signatures?

string strstr ( string $haystack , mixed $needle [, bool $before_needle ] )
bool in_array ( mixed $needle , array $haystack [, bool $strict ] )

In in_array the first parameter is what you’re looking for and the second is what you’re looking in (more or less consistent with preg_match).  In strstr (and its derivatives) this order is reversed. Who on Earth let that slip through? I’m yet to find a free text editor that will tell you which parameters a given function expects (Dreamweaver does a decent job but it’s bloody expensive for a text editor!) the way Visual Studio does for C#, which I use a lot in work.  Given that situation, you’d expect consistency in this sort of thing.  Apparently not so. Instead, every time I want to use one of these functions I have to do a quick Google to bring me to the PHP manual page to tell me which order the parameters come in.

Of course they can’t even fix that without breaking backwards compatibility either, so we’re probably stuck with it.  Bloody marvellous!

Firefox 3 – Initial Impressions

Thursday, June 19th, 2008

I haven’t come across anything truly groundbreaking in Firefox 3, possibly because I’ve become accustomed to much of the feature set through the Betas and RCs, but there are one or two improvements that are quite useful (as well as a couple of regressions unfortunately).

Wee Niggles

First the bad. When you view Page Info from the context menu it doesn’t give a link to the CSS file in the Media tab any more. I was sure it was there in 2 and a quick google confirmed this. This really sucks – I can’t see why they’ve taken it out.

Secondly, when I was looking through the options to try and return the aforementioned CSS links, I discovered Firefox had decided it was going to automatically download any future updates when they were discovered (I promptly switched the option to “Ask me…”). Bad Firefox.

Magic Address Bar

The good is good though. It doesn’t seem like it at first, but to my mind the biggest improvement of all is the address bar. Sure they’ve added a “Most Visited” folder to your bookmarks toolbar which (shockingly, given the title) contains a list of the sites you visit most frequently, but the address bar has some great, if not immediately obvious, usability improvements.

(more…)

Solved: New WAMP Install Won’t Parse PHP

Wednesday, May 7th, 2008

I spent ages trying to figure out why my new installation of WAMP Server 2 wouldn’t parse my PHP and was spitting it out exactly as-is in the source file. I hoked around in the VirtualHost configuration, because the PHPMyAdmin that comes with WAMP Server was working fine so it had to be something wrong in the VirtualHost that I just configured that was stopping .php files being sent to the PHP parser, yes? No.

As it turns out, it’s much simpler than that. Apache was sending the file to PHP to be parsed, but PHP was ignoring my code. Why? WAMP Server 2 comes with “short open tags” turned off (this may be a general PHP or PHP 5 thing, though not sure). Click WAMP -> PHP -> php.ini to edit the aforementioned file and find the line:

short_open_tag = Off

Replace Off with On et voila.

The ‘more correct’ though long-winded solution is to replace all your <? opening tags with <?php if you’re really keen (though that’ll also mean replacing <?= with <? echo). Me, I think I like my short tags.

WordPress / Fantastico Server Move

Wednesday, May 7th, 2008

I recently moved this site to a new host because of ongoing problems with my previous hosts. Thanks to some intermittent database errors I’d decided it would be prudent to do my first backup in some time at the start of last week. By the end of that week they’d deleted my account, so I suppose I should be grateful their database server was so f**ked. Nevertheless, the move caused a few issues when my new hosts told me the complete backup I uploaded to them was corrupt. I can only assume (because some backups were corrupt and others weren’t) that it was due either to encrypting the archives using AES in Winzip or decrypting them in 7zip.

Anyway, that meant manually creating the accounts, setting up the mail accounts and subdomains in them, extracting the root folders (public_html, mail etc) individually and manually importing the SQL backup. Everything was relatively painless (if dull) however Fantastico wouldn’t recognise my Wordpress installations (I had two). To persuade Fantastico that there really were a couple of WordPress blogs I had to do two things:

  1. Extract the \.fantasticodata\WordPress files from the zip (in this case it was called nerd.steveferson.com| ) and upload it to the same location in the FTP server. Of course that bar | made Windows barf, so you’d need to rename it (e.g. using an underscore instead) and replace the bar after uploading it via the FTP client (FileZilla didn’t seem to have a problem doing this).
  2. I think this is might be because the blog’s in the root of a subdomain, but I also had to upload a file called installed_in_root.php from \.fantasticodata to that location on the server.

Once I did this, Fantastico picked up the blog and allowed me to upgrade WordPress to 2.5.1 – no hassle.

What’re you lookin’ at?

Tuesday, April 29th, 2008

Well I thought it was interesting so here’s the top 10 posts on nerd. by number of views (based on the last 500 page hits courtesy of Statcounter.com).

  1. Review: Why the Netgear WG311 v3 Sucks (72)
    Slightly dodgy network card that Netgear don’t seem that fussed about fixing. Bad on XP, it got worse on Vista (see number 4).
  2. Playing iPod Video on Your TV (45)
    Seems to be a lot of people looking for instructions for the iPod Classic. Here’s a tip: sell it.
  3. Server application unavailable: installing IIS on .NET 2.0 (44)
    Seems to be a common problem. Sadly Microsoft’s error message is about as relevant as ever.
  4. Installing Vista (AKA More Netgear WG311 Misery) (31)
    Even more messed up. Thank goodness for Linksys!
  5. Thunderbird/Outlook/Google Calendar Integration (25)
    How to integrate your Thunderbird calendar at home with your Outlook in work, via Google Calendar.
  6. Orange Answerphone (Voicemail) Number for PAYG (23)
    Such a simple problem. Who knew it would be so hard to find?
  7. Stop Monitor.exe Hogging CPU (20)
    Why can’t people just give you a standard installation instead of trying to do everything for you? Help sounds good, until their useful tools start killing your PC.
  8. How to run IIS Web Server in Windows XP Home (20)
    Microsoft’s official line is it can’t be done, but it’s not that tricky.
  9. Making Firefox Scroll With Syanptics TouchPad (19)
    Discovering the solution to making Firefox scroll on my Acer Aspire laptop.
  10. NAS or Home Server (17)
    I deliberate over whether I can justify spending the extra to build or buy a home server before eventually deciding that a Linkstation Live will meet my needs for less than half the price.

Solved: Wordpress Admin Images Missing

Friday, April 11th, 2008

I upgraded this blog to Wordpress 2.5 today, and installed a new copy of Wordpress on a subdomain too. Both these actions were carried out using cPanel & Fantastico.

When I logged into the backend of the new subdomain there were no images – including no buttons on the rich-text editor (TinyMCE) and no Wordpress logo on the login screen.  I later noticed there were also background images missing on the public part of the new blog.  When I right clicked “View background image” on the missing image, it took me to an HTTP 403 (Forbidden) meaning there was a permissions problem. The strange thing was the problem didn’t occur in the nerd. backend.

And the solution…? In this instance it was because I’d enabled hotlink protection in my server to stop other people using images stored at steveferson.com on their sites, because this eats up precious bandwidth.  When I created this new subdomain, I had forgotten about the hotlink protection and so hadn’t added it to the list of sites allowed to link to images at SteveFerson.com.  When I added it everything went back to working as expected.

Solved: Blog XMLRPC 403 Error

Sunday, March 23rd, 2008

I was getting the above error message when I recently tried to set up and try out Windows Live Writer to let me publish to a blog from my desktop without logging into the Admin section of the site. I was felled at the first hurdle when, after entering my b2evolution blog’s details, I was presented with a message informing me that:

The server reported an error with the following URL:

http://www.blog-domain.com/b2evo-path/xmlsrv/xmlrpc.php

403 Forbidden

Thinking it might be a problem with b2evolution, I tried with a Wordpress blog. A different message appeared, both on this blog and another:

(more…)

Thunderbird/Outlook/Google Calendar Integration

Friday, March 21st, 2008

Finally I can have events from my Outlook calendar in work sync with my Thunderbird calendar (enabled using the Lightning plugin) automatically. It’s wonderful… or at least it nearly is.

How It Works

I read some time back of a plugin that allows you to sync your Thunderbird/Lightning calendar (or Sunbird if you prefer to use Mozilla’s calendar in a standalone application) with your Google calendar, which I’m sure is useful for some people, but not me. I’ve never used a Google calendar really. However that memory proved useful when I heard that a Google have released a utility to allow you to sync your Google calendar with your Outlook calendar. I’m sure you can see where I’m going with this…

(more…)