Question: I've been using mamp for a while now and everything has been working great. Then today I go to start it up and mamp alert tells me that apache is already running on that port and to pick another one. So without starting mamp, I type in local host in the web browser - my usual way to get to the sites that I'm developing - and a page pops up and it reads IT WORKS!, which tells me that I have an index.php file somewhere on my computer that echos It works!. But mamp is not running and I can't find this stupid it works file anywhere. Is there any way to diagnose this and perhaps kill this apache server so that I can start mamp back up without switching my ports?

Answer: 
I prefer using [High Performance Computing](http://hpc.sourceforge.net/)'s versions of the GNU compilers, as I need a Fortran compiler, which Apple does not offer.

this solution avoids installing anything BUT a GCC compiler, whereas fink and macports will add quite a lot of stuff to your system. The HPC compiler requires having Apple's developer's tools installed already, but since you mention having gcc I guess you do.
There might be a simpler way using Package Managers like Fink, Homebrew, MacPorts but according to <http://pdb.finkproject.org/pdb/browse.php?sec=devel> Fink doesn't have a g++ package. I don't use Homebrew or MacPorts so you'll have to do your own research. 

Another (relatively more work) option is to download g++ version (4.3.1) you want, config it differently (i.e point it away from the default directories for e.g. /usr/bin but instead have the executable symlink to /usr/local) before building and installing it.