Testing IE6, IE7 & IE8 on one computer

Recently I had to add compatibility for IE6, IE7 & IE8 to a site I was working on. Only problem was that I can only have one version of IE installed on my machine.

STEP 1: Getting things running

  1. Download & install Virtual PC
  2. Download the IE VPC images you need from Internet Explorer Application Compatibility VPC Image.
    Note: You don't need to download the version that matches your operating system since each VPC image contains a full version of the OS.
  3. Once you've downloaded your images, click on the .exe to extract them to any folder on your computer
  4. Launch Virtual PC (Default Location: C:\Program Files\Microsoft Virtual PC\Virtual PC.exe)
  5. From Virtual PC Console, click New...
  6. Option: Select Create a virtual machine option and click Next >
  7. Name: Name your New Virtual Machine, ex./IE6 or IE6 XP SP3, and click Next > Note that it does ask you for 'Name and location' but you just need to specify the name here, later on it'll ask for the location
  8. OS: Choose 'Window XP' as the Operating System (or whatever OS matches the images you downloaded) and click Next >
  9. 'Use the recommended RAM' Next >
  10. 'An existing virtual hard disk' Next >
  11. Location: Browse to the location on your computer you extracted your image earlier. Next >
  12. Done: Finish to close the wizard and create a virtual machine with the settings you specified

Repeat the wizard for as many images you need to install.

You can start your new VPC image anytime on your computer by selecting it from the Virtual PC Console and clicking on ‘Start’.

STEP 2: Getting localhost to work

With the installation above you're ready to start using your installed images. Problem is that each image is their own installation of Windows. So for testing locally you can't just type 'http://localhost/my-site' and see it as you do normally.

  1. Get the IP address you need to access: From the CMD prompt type 'ipconfig', use the IPv4 number near the top (you many need to scroll up)
    Note: You can access the CMD prompt by either clicking start and entering 'cmd' into the search pane... or by going to C:\Windows\system32\cmd.exe
  2. If you haven't already launched Virtual PC and select one of your images to start.
  3. Type the IP address you found via the command prompt into the address bar, you should get a Forbidden (403) error. This is because Apache isn't configured to accept requests from the IP being used by VPC.
  4. Open your Apache access log (may take a moment)... scroll to the bottom for the last access... should be something like
    192.168.0.10 - - [25/Aug/2009:10:02:50 -0400] "GET / HTTP/1.1" 403 202
  5. Open your Apache httpd.conf, Search for 'Allow from'
  6. Add a new line underneath with the IP address from the Apache log Allow from 192.168.0.10
  7. Restart Apache

Now the IP address of your VPC image is allowed to access your localhost... hit refresh on the browser in VPC.

Drupal Users

If you're using a different settings profile than default, you'll need to either update the default settings to use your local settings or create a new folder with the new settings profile.

Create a new folder in sites/all and name it the IP address you just added to your Apache settings '192.168.1.10'. Copy settings.php from the folder being used by your localhost into the new folder and make any configuration updates needed (ex./ base href).

Add comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags
  • Lines and paragraphs break automatically
  • Websites and email addresses turn into links automatically

jsfwd on Twitter 

  • 13 hours 12 min ago hot damn rock vs rap!! thanks json RT @jswaby: @jsfwd http://www.sfspodcast.com rock vs rap
  • 13 hours 26 min ago #Raptors taking 5th seed back tonight! (with a little help from Boston)
  • 1 day 17 hours ago Two screens are better than one. I want. RT @BeCircle Yeah - iPad pwned by Courier. Way cooler and way more useful. http://bit.ly/aO4DqS
  • 4 days 18 hours ago World's largest gummy bear?!? http://www.giantgummybear.com I want one!
  • 5 days 21 hours ago Firefox 3.5 supports the word-wrap CSS property, finally :)
  • 6 days 12 hours ago Has anyone using #drupal and #mollom had any spam problems after upgrading from 6.x-1.10 to 6.x-1.12?
  • 6 days 12 hours ago @mollom has been almost flawless at blocking spam, but now cleaning uber-spam that started after upgrading the drupal module to 6.x-1.12.
  • 2 weeks 1 day ago February Drupal Toronto Meetup tonight... Topic: 'All about hosting' http://bit.ly/d8xM20
  • 2 weeks 5 days ago Since my earlier tweet re: http://pleaserobme #foursquare I've received over 7000 new opportunities! Who says there's a recession?
  • 2 weeks 5 days ago Tweeting your location can be hazardous to your home http://pleaserobme.com #foursquare
more jsfwd on Twitter »
i heart cycling