November 19th 2007 / learned, taught
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.
2 comments
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!
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
I don't need no stinkin' hierarchal organization
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.