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 trialchrisshadrach
11,058 PointsMAMP won't open .php file
Please excuse the terminology, I'm new to servers and php but will try my best to be clear. When I downloaded the latest version of MAMP and ran it on the latest version of Windows, I initially had an issue that was resolved by changing the standard version to 7.2.14 - as recommended by someone.
When I save files in C:\MAMP\htdocs it opens .html and .php without any issues. I use dropbox to store my coding files so they are always backed up and when I change the document root to a different folder it will load index.html but as soon as I change it to index.php it shows a blank page. What am I doing wrong here? I moved it to a folder on my desktop and had the same issue. When I put it all into htdocs it works again. I'm sure this is embarassingly simple to resolve. For now I am just practicing in C:\MAMP\htdocs. Thanks!
1 Answer
michaeldavies3
22,911 PointsYo, just working through this course for some revision and saw your Q... If this is still an issue, or if future students have this issue, check your port settings in MAMP ("MAMP"/Preferences/Ports). I had the same issue, but setting these to 8888 and using the URL http://localhost:8888/ instead for local development fixed this. Hope that helps someone!