Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Setup Your Local Development Environment

Ker Sing Tan
Ker Sing Tan
10,573 Points

Could not start web page

I have installed MAMP and turn on the servers. But i noticed only mySql server green light is on , but Apache server green light is off. After I click on open webstart page i got this error This site can’t be reachedlocalhost refused to connect. Try:

Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED

3 Answers

John Nguyen
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
John Nguyen
Full Stack JavaScript Techdegree Graduate 30,501 Points

Ker Sing Tan : I see that you had issues getting the apache server started. I also had the same issue.

I was running MAMP(not pro) on Windows 10(64-bit) and the apache server wouldn't start. I found this solution from stack overflow.

  1. Mamp -> Preferences
  2. PHP -> Change Standard Version to 7.2.14 (Or a different option than it is now)
  3. Click OK.

Mamp should restart and the apache server should run normally now. I hope that helps!

I might suggest you simply re-download and reinstall MAMP fresh. The reinstall should persist anything in your htdocs folder and even keeps your databases if you had any (double-check that so I don't steer you wrong if it matters). This just seems like it's gotten buggy enough that a fresh start might be easiest. MAMP is usually really smooth and "just works" out of the box.

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi, Ker Sing Tan and everyone in this thread! I was just alerted to this thread :smiley: Good workaround, John Nguyen! In my research on this topic (because I also experienced this), it seems that the root cause for the Apache flickering on and then off again is due to a setting being commented out in php.ini for later versions of PHP that shouldn't be commented out.

Specifically, you are looking for this line: extension=php_openssl.dll. If there's a semicolon in front, then it's "commented out" and Windows absolutely needs it to run Apache.

You can find more information on it here.

Hope this helps! :sparkles: