Category Archives: I.T.

General blabberings about computer pish.

Office 365 is broken: Sorry, there’s something wrong with your account

I have Office 365 which has been ace for the past few months. Alas, it’s stopped working on my Win7 laptop for no apparent reason, and when I attempt to log in to and see what’s up, I get “Sorry, there’s something wrong with your account”. Unhelpfully, although it says “We need your help to fix the problem. Click Contact Support to get help”, and suggests I click the “Contact Support” button, it takes me to the front page of their Support Centre, with no indication of WTF I am now supposed to do to gain said help.

So I contact Microsoft through their web site and they are totally stumped. They first say they can see nothing wrong with my account, but later admit they have many other cases of this, and they have to escalate it to get it fixed, which can apparently take days. So I’m without Excel on my Win7 laptop for a while, then… :(

[ Updated 16-Apr-14 ]

Credit where credit is due, Microsoft duly fixed the problem 2 days later. At least, they have fixed the problem with my online account – I still have to reinstall it on the Win7 laptop to see if that resolves that problem, but I didn’t ask them to fix that (yet).

VirtualBox broken on OS X 10.9 Mavericks?

After upgrading to OS X 10.9 Mavericks, I could no longer get my virtual machine to gain access to my wifi.

The fix is as detailed by the user Jabbslad in their post on 06-Oct-13, in this thread:

I was getting the alarming error message below when attempting to boot my instance:

Failed to open a session for the virtual machine
Failed to open/create the internal network 'HostInterfaceNetworking-en1: Wi-Fi (AirPort)' (VERR_SUPDRV_COMPONENT_NOT_FOUND).
Failed to attach the network LUN (VERR_SUPDRV_COMPONENT_NOT_FOUND).
Result Code: NS_ERROR_FAILURE (0x80004005)

However, as I say, the above workaround resolved my problems. And just in case that page ever disappears…:

— 8< — OS X 10.9 Mavericks has deprecated the StartupItems mechanism for starting services on boot. Until this is fixed it looks like VirtualBox’s host-only networking is broken as per ticket: #8940. This also means if you use Vagrant it will complain that it can’t start boxes. The temporary workaround is to create a Launch Daemon yourself. This Launch Daemon will call the old StartupItems script. 1.) Create a ‘virtualbox.plist’ file in ‘/Library/LaunchDaemons’. (Note: You will need to sudo to create the file). 2.) Add the following content to the file before saving it:- <?xml version=”1.0″ encoding=”UTF-8″?>  <plist version=”1.0″>    <dict>     <key>Label</key>     <string>virtualbox</string>     <key>ProgramArguments</key>     <array>       <string>sh</string>       <string>/Library/StartupItems/VirtualBox/VirtualBox</string>       <string>restart</string>     </array>     <key>KeepAlive</key>     <false/>     <key>RunAtLoad</key>     <true/>   </dict> </plist> 3.) Run the following two commands so the Launch Daemon is auto-started when OS X boots:- sudo chown root /Library/LaunchDaemons/virtualbox.plist sudo launchctl load -w /Library/LaunchDaemons/virtualbox.plist 4.) Restart your machine to test (optional) sudo shutdown -r now Hopefully a fix will be issued soon, in the mean time this will mean you don’t need to keep running ‘sudo /Library/StartupItems/VirtualBox/VirtualBox restart’ every time you restart your Mac. Jabbslad

1and1 WordPress Issue: Redirect to

My web host, 1and1, are currently redirecting all wordpress login attempts to by sending a 302 redirect to all requests to wp-login.php – I can only post this via my iPhone… It seems wordpress for many of us using 1and1 is therefore currently uneditable. The blog itself is up, mind you.

[ later ]

The issue now seems to be resolved, thankfully.

One of the comments to this post suggests editing wp-admin.php, which sounded ideal, but my install doesn’t have such a file. It’s possible yours does, maybe if it’s not been updated for a while, and that this workaround could work. I say this because I suspect this is going to happen again in the future.

Why? Well, from a bit of googling around, it looks like there’s a chance that 1and1 (and other hosting companies) are using this tactic to reduce load on their systems when they are under a DDoS attack, potentially a specific DDoS attack which is targetting WordPress installations. Unfortunately, there was no such attack on my site, but that doesn’t mean that other sites hosted by 1and1 were also unaffected, and there’s little chance of getting much info out of them about it. Personally, I doubt it’s a DDoS attack intended to bring down the hosting company – I’d have thought it’s more likely to be a script kiddie attempting to brute force their way in to as many blogs as they can. But either way, an attack of some kind appears likely.

All in all, though, I’m not going to suggest that 1and1 are terrible and start investigating other suppliers; I’ll be honest, these guys are pretty damn stable, and their actions yesterday only prevented me from adding posts via my browser, while the blog itself was up the entire time. And it’s working fine today. If this starts to happen regularly, then yeah, I’ll start to get annoyed, but as things stand right now, it’s no biggie.

7-zip in Mac OS X

I find it annoying that OS X doesn’t come with 7-zip out of the box, and that there’s no download for it on their web site either. Thankfully p7zip exists instead, which you can easily build and install on your Mac, with a swift make / sudo make install. Once you’ve done that, you have 7za on your path to handle 7z files (amongst others).

Authenticating with Google using OAuth2

I spent a fair amount of time a few days ago attempting to figure out how to authenticate with Google so that I could write an app that would be able to download RSS feeds automatically from Google Reader. A number of documents that I read were old and out of date and discussed ways of doing it that are no longer relevant, and it took me one hell of a long time to figure out that it’s actually quite simple, and that you don’t need to use an API to do it. Indeed, I found it was vastly easier to not use an API, as they just confused things.

First off, why would you want to integrate with Google? Well, for my purposes, I wanted to read an RSS feed from a forum, but the RSS feed from this forum only gives me the last 25 posts, and if the app didn’t run often enough, it would miss posts to the forum if there had been more than 25 posts since it last ran. Google Reader resolves that problem for me, because it polls the RSS feed relatively often and therefore saves all posts, allowing me to get access to a historical set of posts.

It turns out there are a hell of a lot of Google services that you can engage with programatically, and to find a list of those available, the word you’re looking for is “scope”. Ultimately, the “scope” your app works within defines the Google services that your app can use.

Fundamentally, if you have a web app that wants to use a Google service, all you do is redirect your user to Google where they will agree (or not) to provide access to that “scope”, or service, and then they are redirected back to your web app. Your web app then exchanges data with Google to finish the initial handshake, and at that point it can start to download data.

You don’t have to do this using Javascript. A lot of the examples seem to suggest that you can only do this with Javascript from a browser, but this isn’t the case. You also don’t need to use the API software that Google provide. The Java one is just horrific in terms of size and confusion. All you need to do is read a couple of documents that explains the flow of how to get it going.

First, a general description. I’ll be honest, I found this one to be confusing and of no use, but I thought I’d link to it anyway.

The one I found was the most use, and got me 99% of everything I needed to know, was the web server document, which shows you in low level detail what your GET and POST requests need to look like, including HTTP headers. If you have that, you don’t need a confusing API which is most likely written by someone with a specific purpose in mind. Not only that, but I found the APIs took me longer to understand than just reading that web server document and giving it a try.

One additional page I found, which might have been useful during my investigations, is an OAuth 2.0 playground. I didn’t ever use it as I just wrote the web app in a “suck it and see” way, but it might well be useful for you.

Ultimately, integrating with Google and authenticating using OAuth 2.0 was pretty simple, but it took an age to find out that this was the way to go. Google’s own results when I was trying to figure out how to do it took me down too many dead ends, but as of today (30-Dec-12), OAuth 2.0 is the way they are doing it right now.

1and1 PHP 5.4 upgrade takes wordpress blog down – now fixed.

Another apparent arse-up from 1and1 hit me a couple of weeks ago, taking the blog down. I don’t read my own blog, so I didn’t notice until tonight when I went to upload a new post, and discovered it wasn’t working due to being unable to connect to the database.

Transpires that the problem is due to passwords being stored by 1and1 in the old MySQL 4.0 format (or maybe 4.1 format, I can’t recall). Alas, when I followed their instructions and changed the blog to run PHP 5.4, I then went straight to the web site and tested it, and it worked fine. I think what then happened is that something changed a few minutes later, rather than taking immediate effect, and broke the site completely, but of course I didn’t notice this as I had tested it and it worked fine. The site was therefore down for 2 weeks.

So, if you are going to change your site to PHP 5.4, beware that 1and1 seem to have either some kind of caching going on, or they delay making changes to your site for a few minutes, so you probably need to pay attention to your site over the next 24 hours. If you discover it is broken, then all you need to do is go into your 1and1 Admin section, go to MySQL Administration and update your password. You can keep your password the same; just update it to whatever your password is right now. What I think then happens is that the 1and1 system updates your password using the latest hashing algorithm which PHP 5.4 can cope with, and everything just works. But be aware that this also seems to take some minutes to update, as I did this, the blog was still broken, and then I waited a few minutes and would you believe it… the blog was fine.

Hopefully posts such as this one will help others resolve the problems.

Convert a file from Windows to Unix line endings

A neat little trick I learnt many years ago continues to come in handy now and again. Like yesterday at work. Someone had a file with Windows line endings and needed it converted to Unix line endings, otherwise the recipient couldn’t cope. Yeah, the recipient is clearly incapable, but there you go. There’s clearly many ways to do this, but the quickest way I know to convert the file is:

perl -pi.bak -e "s/\r\n/\n/g" /tmp/filename

Obviously, that last parameter is where you would put your filename.

Anyway, all this does is run a Perl regular expression on your file, and converts \r\n to \n. It also takes a backup of your file, just in case. And that’s it.

If you want to see the result for yourself, run od -c on the before and after files, and you should be able to see the different line endings quite clearly.

DogCam Bullet HD Wide – More Crashes

The Dogcam Bullet HD Wide has been replaced, but alas, it’s still doing the same thing in that it is crashing repeatedly. My daily 6.5 mile commute takes me around 25 minutes, and the camera crashes well over 50% of the time during my commute; the last 6 journeys have seen 5 crashes, for example. I can’t see any routine to it, and I’ve used two different 16GB cards in it now.

They think it might be to do with the new style SD cards. I didn’t know they had changed, but I will try swapping it for a 4GB card from tomorrow to see what happens.

There’s certainly no way I can take the camera out on any kind of proper activity where I’m wanting to collect video, since it crashes so often. There’s also no way to tell it has crashed until you plug it into your Mac/PC and play the video. Still, I’m getting plenty of feedback from the guys at Dogcam who are as confused as anyone, so I’m hopeful a resolution will be found soon.

Realistically, I’m needing a camera that works reliably within the next month so I can take the girls on a camping / cycling trip up near Callander.

DogCam Bullet HD Wide Crashes

I got myself a DogCam Bullet HD Wide a few weeks ago, for use mainly on my road bike. It’s pretty small and attaches very well to my helmet, but alas, it repeatedly crashes when I use it outside. I’ve tried it three times outside now, and each time, it stops recording video at a random point during the recording and the audio changes to a badly tuned radio sound, with massive hissing noises. Totally pointless. I’ve not even taken it anywhere where the terrain is such that it gets knocked around, this has been on roads on a road bike. Not impressed, tbh. I’ll see if I can get a replacement, failing that I’ll chuck it and try something else.

Ordnance Survey Get-a-Map Log In Issue

It might just be me, but I can’t manage to log in on the Ordnance Survey Get-a-map site. I’m on a Mac (Snow Leopard) using Google Chrome, and although the login box appears, and the cursor is flashing in the text field boxes, it doesn’t recognise anything when I’m typing; the cursor just sits there flashing as if I’m not typing at all.

It works fine on Firefox, so the workaround isn’t exactly difficult, but I’m starting to wonder whether it’s just my box, or whether this is a generally known issue. Searching on Google doesn’t seem to bring up anyone else with the same problem…

[ added later ]

I have discovered a way to log in using Chrome on a Mac. Although the login box won’t let you type in the fields, it lets you paste in text, so if you copy text from a text editor and paste it in, that works. I know, mental, eh? But if you desperately want to use Chrome on a Mac, this does seem to work.

I blame Silverlight and/or Chrome, not the Get a Map dudes for this oddity.