Occasionally Relevant Insights from a Software Builder


Repairing Windows Live Messenger

One of my Windows Live Messenger installations stop working recently and I spent quite a bit of time trying to repair it. The standard procedure is to uninstall through the Control Panel and then reinstall, but this didn’t work and I kept getting the same error. The application would crash as soon as I would login.

I searched the Internet and tried many solutions, but nothing worked. Fortunately, Microsoft posted a solution which details a thorough uninstall of Windows Live Messenger. It involves executing commands from Start->Run and also running commands which delete entries from the registry. The instructions are easy to follow, but may be somewhat intimidating for a novice user.

After following these procedures, I was able to reinstall a working copy of Windows Live Messenger. This page can be found at Clean Installation of Windows Live Messenger.


Fixing “Error: bad interpreter: No such file or directory” in PHP

I prefer using the PDT tools in Eclipse for working with PHP, but a problem that I keep getting when creating new files is that I can’t execute them in Linux. I get the following error message when I run PHP files from the shell:

Error from PHP document created in Eclipse.

When you get an error like this, the first thing to check is if the interpreter is correct in the PHP source code. This is the first line of text and it looks typically like

#! /usr/bin/php

The PHP interpreter’s path can be found by entering which php in the command shell. Unfortunately, this won’t fix the problem for a PHP document created in Eclipse. The files are being saved as DOS files which you can see if you open your document with vi (see below).

Eclipse created a DOS file.

There is no option in the PDT tools to save files as a UNIX type. The best way to do this is go into the command shell and use the dos2unix command:

i.e. dos2unix test.php

This will convert test.php to a UNIX file type and then it can be executed in the shell. If you view it in vi, the [dos] indicator will not be displayed (see below).

The document is now a UNIX file.