newbie: browser won't parse html... but only from localhost?

Giganews Newsgroups
Subject: newbie: browser won't parse html... but only from localhost?
Posted by:  jzacsh (jzac…
Date: Fri, 24 Jul 2009


I am trying to figure out why my localhost is behaving funny. Bowsers
(camino, safari, firefox) aren't rendering html pages I try to serve,
* firefox: upon visiting an HTML page I wrote in vi, firefox just
shows me a "download save/open" dialog box.
* camino: just downloads the file as well
* safari: yesterday it was just downloading the file like the other
browsers, now its actually showing me the ascii contents of the file
when I visit it (as if its a .txt file I'm serving)

I've only gotten my browser to render the pages when:
* I open the file directly off my drive with file:///path/to/html/file
* I upload them to my actual paid web server.

This is the first time this has ever happened, usually I can open up
my text editor of choice (terminal + vi, smultron, bbedit, textedit,
etc.) and write a page from scratch without any problems, and view it
as I work in the browser.

*maybe worth noting: there is some html that will render from
I have entire local installations of drupal, joomla, wordpress,
indexhibit, etc. and they all work wonderfully (of course these are
php pages, but the browser should see this no differently than html,
right?). What's also weird is that some php pages (ones I've written
in the past, and I know used to work) no longer work either - this
tells me that its not because I wrote the page via the terminal or
something and have executable (777) or maybe lacking (444) permissions
on it that the browser isn't liking.

any advice? anyone? maybe I should try reinstalling MAMP, maybe
something's wrong with the httpd.conf file? would I need to know how
to backup my mysql databases then in order to properly put them back
in? (i know that you can't just dump the database and put it back -
i'm not too familiar with mysql though).

thanks a bunch, in advance!

--ps, if this is the wrong place to be posting this, then let me know
and I'll repost it somewhere else.