3

My problem is this: I've installed MAMP Pro (2.1.4) on my Mac OSX 10.8.3 (Mountain Lion) and have created two new virtual hosts.

test1.dev
test2.dev

test1.dev is a website running on Concrete5 CMS. I have all the files hosted locally but the website is connecting remotely to an online database. test1.dev loads pages extremely slow. For whatever reason the homepage and the contact page load as if they were fully cached. Super snappy. However all of the other pages on the website take almost a whole minute to load.

test2.dev is static website without out a CMS. Just some simple PHP, Javascript, and HTML. Every page loads super fast. No issues whatsoever.

This leads me to believe it has to do with connecting to the remote database. With that being said, I've read a ton of different articles about people having (what sounds like) the exact same problem. At this point I feel like I've tried all of the solutions that have been posted around the internet.

I've tried editing my hosts file to look like so (same line, space delimited):

127.0.0.1 localhost test1.dev test2.dev
::1 localhost
fe80::1%lo0 localhost

I've also tried this (separate lines):

127.0.0.1 localhost
127.0.0.1 test1.dev
127.0.0.1 test2.dev

And I've tried this:

Make sure to put the IP v6 entries not in the line with localhost. The IP v6 entries go in a separate line

::1 localhost
fe80::1%lo0 test1.dev test2.dev

These were all suggested here.

I've also tried the answer suggested here.

::1 localhost   test1.local    test2.local

I tried disabling IPv6 in Firefox:

In Firefox you can disable IPv6, which eliminates the problem entirely for that browser. Go to the URL about:config and in the search box enter "ipv6." There should be a single entry: network.dns.disableIPv6. Enable it. Restart the browswer. Done.

And I tried adding skip-name-resolve to MySQL's my.cnf configuration file.

All of this and nothing seemed to help. As a side note, I was flushing my DNS cache, restarting my browser, and even clearing my browser as I tried all of these things. Sadly nothing has help.

Maybe this doesn't have to do with MAMP or my hosts file at all. Perhaps it's a server setting where the DB is located? This is my first time trying something like this and I'm not that knowledgeable with MySQL so I don't know the ins and outs of database connections.

Thanks in advance!

Community
  • 1
  • 1
norsewulf
  • 491
  • 5
  • 21

0 Answers0