The Artistic Outlaw

mathiasaurus

November 19th 2007 / learned, taught

Mac OS X 10.5, MAMP and VMWare Fusion

This is a note to myself more than a real post, so feel free to ignore it or use the info if need arises.

When using vmware fusion for MSIE testing on Mac OS X 10.5 Leopard through a MAMP based localhost. WordPress sites acts weird and won’t let you view sites on the localhost through MSIE.

The cause and solution of this issue is the following;

On the mac, with a MAMP based localhost, sites can be accessed via a url similar to:

http://localhost/~sites/

Whereas the same localhost setup viewed through vmware fusion using MSIE has to be accessed via a url like this:

http://mac's-ip(127.0.0.1)/~sites/

This causes a problem for WordPress based builds, because WordPress stores the full absolute URL to the install in it’s MySQL database in the table wp_options there are two rows that store the URL you need to change. They are siteurl and home. Just modify them and change the localhost bit of the URL to your mac’s localhost IP address.

Now WordPress will work fine through both vmware fusion’s MSIE install and your own mac browsers, because the mac doesn’t care if you use localhost or the IP to access your localhost sites.

Now you’re cooking with gas my friends.

photo of James“Mac OS X 10.5, MAMP and VMWare Fusion” was written by James Mathias on November 19th 2007

A writer, artist and outlaw. Living, working and playing in Tennessee. James writes TAO in a vain effort to teach, learn and share with the industry he loves.

feedback, comments & opinions

2 comments

David Sissitka

11/20/07 11:48 pm

Alternatively you could add “(Mac’s IP Address) mac” to C:\Windows\system32\drivers\etc\hosts. That’d make WordPress accessible at http://mac/~sites/ in your Windows VM. :)

jazzerbobby

04/28/08 3:18 pm

I’m trying this with a MacBook Pro & Leopard but don’t quite understand the setup.

I’ve got Web sharing turned on in system prefs, MAMP running with green lights & it’s apache server document root set to “Users/computername/Sites”. From both the Mac side & the VM side I can call the file I need to launch my site using this URL structure: http://ipadress/site/file.php

I can reach the file but it’s returning PHP code in my browser, so apache must not be processing the code. Does MAMP’s apache server process anything at all if I access a PHP file via the mac’s IP? I’m sure lots of people as ill-informed as me would absolutely love Fusion if they could check sites for IE bugs in this way!

Archive, older stuff

Enjoy my stuff? here is more.

2008 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

2007 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

2006 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

2005 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

Categories, taxonomy?

I don't need no stinkin' hierarchal organization