Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Build a Simple PHP Application Getting Started with PHP Install PHP on Windows 7

Carlos Belnap
Carlos Belnap
4,564 Points

MAMP didn't work, so I tried XAMPP, but I'm getting the same error. Localhost does not display in my browser.

How do I get localhost to work? I've tried everything that was suggested with MAMP. That didn't work, so I've installed XAMPP. Apache shows as running in the console, but when I click "admin" it takes me to a webpage not available screen. What am I doing wrong? Is there some obscure setting on my PC I'm not aware of?

Logan R
Logan R
22,989 Points

Make sure any application, such as Skype that uses port 80, is not on.

Edit: Try checking your hosts file to make sure localhost 127.0.0.1 has been added.

4 Answers

Carlos Belnap
Carlos Belnap
4,564 Points

Thanks for your suggestions, but I decided to just cut to a factory reset, then upgraded from Windows 8 to 8.1, and then installed XAMPP and that did the trick!

Also make sure you're not missing off any required ports at the end of the url.

Logan R might be able recall the default port for MAMP/XAMPP, if any.

Can you also give us the error you're picking up?

Ian Blakeslee
Ian Blakeslee
22,154 Points

Also, make sure that MAMP or WAMP is actually running. There may be an icon for it in your task bar. If you click on it, there should be a menu somewhere that says "put online" and "start all services." Try turning one of those on and see if your localhost address works then.

Zeljko Porobija
Zeljko Porobija
11,490 Points

Try with EasyPHP. It's quite easy and installs everything you need. This is not an ad, just telling my own experience.