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 Build a Simple PHP Application Adding a Contact Form Creating Input Fields

MAMP won't read my PHP file

Yesterday, I was using MAMP for the first time to locally host a server in order to see active changes I was making on my PHP project. Today, I booted up MAMP, and for some reason, I can't get my directory to load in my browser. Every time I go to localhost, I just get a blank page. SOMETIMES it will load the homepage index.php file, but the CSS won't load, and when i refresh the page, it goes back to the blank white page. I've been doing some research around the internet, and this seems to be a problem a lot of people have with MAMP with no clear direction on how to solve it. Any ideas?

In your browser have you tried it with the port number? localhost:8888

2 Answers

There might be an error in your code. I frequently get blank pages, or pages that are acting strange when working with PHP. Usually it's a sign that I need to debug.

Be sure to have your files inside Applications/MAMP/htdocs. Then try opening MAMP, and click Open Webstart Page. Mine opens this link "http://localhost:8888/MAMP/?language=English". So ow take out all that stuff and open http://localhost:8888 and be happy :)

I tried that, no luck. Did it work for you?