Web pages not found after MAMP update

Hello everyone. First time poster here at Sitepoint. I sure hope someone can help me out with this problem…

I have a website that is written in PHP and MySQL. The website/webpages have been working perfectly for the last few years.

Lately I have been working to add the ability to accept credit card payments on my website, but I found out last night that I need a newer version of cURL to be able to interact with the payment gateway. So this morning I installed MAMP 3.5 on my laptop. (I couldn’t install the latest version of MAMP, because I don’t have the latest OS, and don’t want to upgrade my OS right now.)

After installing MAMP, I updated the following config files: hosts, httpd.conf, php.ini

(I haven’t done this is a couple of years, but I have experience doing this, so it shouldn’t be a big deal.)

Okay, so here is what is happening that has me freaking out…

When I launch my index.php file it loads okay. But then if I start navigating around my website, most pages give me this…

Most pages on my website rely on Apache mod_rewrites so that I get “clean” URLs, and I am thinking that this is where the problem is at. However, none of my code-base has changed. The only thing that has changed is that I upgraded my version of MAMP, and thus have newer versions of Apache, PHP, MySQL, and so on.

I would really appreciate it if someone can help me figure out why my website is broken all of a sudden!!

It looks like my weekend just got trashed because of this stupid MAMP upgrade.

To make matters worse, I know nothing about Apache or MAMP, so I am really screwed right now.

I pray that this is an easy problem to troubleshoot for someone who is an expert.

Thanks,

Steve

It looks like I found an answer.

In the httpd.conf file, I changed the DocumentRoot to my new document root and a tag called < Directory > which also needed the updated document root.

So far all of my pages are loading.

It is funny, because in my hosts file and php.ini file, I added comments so I remembered to update the new files created when I upgraded versions of MAMP. But unfortunately I forgot to do this in my httpd.conf file and so I missed the subtle differences!

Let’s hope that this newer version of MAMP fixes the original issue I was having with my payment gateway last night!

SteveO

4 Likes

Good luck with it! Thanks for posting the answer.

I have a file in which I record everything I’ve done to set up MAMP, because it’s impossible to remember it all down the track. Make sure to record these steps somewhere so that you don’t face the same problem next time. :slight_smile:

These days, people are using things like Vagrant or Docker to do this kind of work, as you get the same environments everywhere. Unfortunately, I find them too bewildering, so I just stick with good ol’ MAMP. :stuck_out_tongue:

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.