Cannot Save Hosts File in Vista

Having recently upgraded to Windows Vista to get to grips with IIS7 I opened up the Hosts file to add in a host header for local web development, upon saving it informed me it couldn’t save.

There’s a very simple solution to this:

  1. Click Start
  2. Click All Programs
  3. Click Accessories
  4. Right-click Notepad
  5. Select Run as administrator

Now when you save the hosts file it will allow you to update. If you’re user is not setup as an Administrator you may be asked to enter the administrator password.

Have fun!

Safari Browser For PC

Well, I guess it was only a matter of time, but Apple have released the latest version of their browser called Safari and it looks like it’s available for Windows users too!

I’ve not had chance to install it yet, but I will do soon. In the meantime why not check it out for yourself?

Download Safari 3 Public Beta from the Apple website.

Update - 20 June 2007: Below is a comparison between Safari & Firefox, you’ll hopefully see that the Safari image is more vibrant.

Browser Comparison

ColdFusion 7.02 and WAMP 1.7.0

I thought I’d share some details about how I installed ColdFusion 7.02 and WAMP (Windows Apache MySQL PHP) 1.7.0 on my Windows XP Pro development PC. For those experiencing problems installing ColdFusion with Apache 2.xx please read on - the information that follows may help. Note: ensure you have the Java Runtime installed!

  1. Download the required software - ColdFusion and WAMP.
  2. Install WAMP - if you need help doing this please see the help file.
  3. Install ColdFusion - I recommend following the instruction that can be found in the ACME guide.
  4. Download the ColdFusion update and extract the ‘wsconfig.jar‘ file and place it in the ‘C:\CFusionMX7\runtime\lib\‘ folder - if Windows Explorer tells you it can’t replace the file then you will need to stop the ColdFusion service before attempting to replace the file, just remember to start it up again.
  5. Once all the required software is installed hit the Windows key + R to bring up the run command and type in ‘cmd‘ and hit the enter key.
  6. Paste the following in (right-click and select ‘Paste’) ‘cd C:\CFusionMX7\runtime\lib\‘ and hit the enter key.
  7. To remove the existing config copy and paste the following in ‘java -jar C:\CFusionMX7\runtime\lib\wsconfig.jar -remove -ws Apache -dir “C:\Wamp\Apache2\conf” -v‘ and hit the enter key - you should get a rather lengthy message returned, if you don’t then somethings not quite right.
  8. To add the new config copy and paste the following in ‘java -Dtrace.ci=1 -jar C:\CFusionMX7\runtime\lib\wsconfig.jar -server coldfusion -ws apache -dir “C:\Wamp\Apache2\conf” -bin “C:\Wamp\Apache2\bin\httpd.exe” -coldfusion -v‘ and hit the enter key - again you should get another lengthy message returned.
  9. ColdFusion and Apache should now be friends again!
  10. Finish off the installation by running the ‘Configuration Wizard‘ from: Start - All Programs - Macromedia.

If you’ve got questions then please visit the thread on the Adobe website that relates to this topic - there is tonnes of other people’s comments about this issue.

Windows TextMate Port

I’ve never really used the TextMate editor, but have always heard good things about it from the Mac community. It’s an ingenious approach to code writing as it tried to aid writing code quickly by offering snippets in a variety of coding languages (including ColdFusion).

It was purely by chance that I happened to stumble upon a new text editor that has just become available for the PC called e-TextEditor and it seems to emulate TextMate very closely, which is nice.

So, naturally I was quick to download and install it. After applying the ColdFusion Bundle (which was a breeze thanks to cfTextMate) I tested out the editor’s nifty features. Very impressive, and I’m sure with regular use writing ColdFusion will be an even more pleasurable experience.

e-TextEditor

Here’s a few items I really like:

  1. Indent guides - provides a visual guide to your code indents
  2. Themes - loads of different colour themes to choose from (not essential, but a nice bonus!)
  3. Bundles - these are code ‘packages’ that allows the magic to happen (e.g. simply type ‘cfif’, press tab and be amazed!)
  4. TODO / FIXME / CHANGED - simply add these to comments and then view the list of things to do

The editor is still in beta stage, so it’s a little rough around the edges, but I know I’ll be keeping a very close eye on it’s progress.

Gem of an Editor

I recently had the need of a code editor that could make backups of files before saving them - a feature that I though I wouldn’t be able to find in a free application.

After a short Google session I came upon Crimson Editor. It’s no longer being maintained but it is definately worth investigating if you’re looking for a light-weight code editor. The one feature that I do love is the ability to create a copy of the file before it was editted when you save it. This can also be done in such a way that they get autonumbered - thus creating a simply version control system.

There is a set of ColdFusion tags in a syntax file (click on ‘Syntax Files’ and then search for the term ‘ColdFusion’) and these are very easy to install. It doesn’t have an auto-complete feature, but this can be a good thing as it forces you to remember the tags.

Keyboard Layout Shortcut

Recently my keyboard layout seemed to magically switch from UK to US without me requesting it to. Or so I thought!

Windows has a very nifty shortcut sequence built into it of ‘Left Shift + Alt’ that will switch between the two available layouts.

If you find this happening to yourself and want to disable the shortcut then follow these directions:

  1. Right-click on the taskbar
  2. Select ‘Toolbars’
  3. Select ‘Language Bar’
    (you should now have a blue indicator on your taskbar - mine says ‘EN’ indicating English)
  4. Right-click on the indicator icon and select ‘Settings…’
  5. At the bottom, under ‘Preferences’ click the ‘Key Settings…’ button
  6. Ensure ‘Switch between input languages’ is selected and click the ‘Change Key Sequence…’ button
  7. Untick the two checkboxes (these are ‘Switch input languages’ and ‘Switch keyboard layouts’)
  8. Click ‘OK’
  9. Click ‘OK’
  10. Click ‘OK’
  11. To remove the indicator from the taskbar -right-click on it and select ‘Close the language bar’.

Done.