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 trialDaniel Silva
10,644 PointsPHP,Apache, and MySQL installation MAMP
Hello,
I've installed the basic package of MAMP for PHP and MySQL on my Windows 7 PC. The Apache and SQL servers have green lights. When I create the test file and put in some php code then run it, it does not appear in my web browser(firefox). When I put in basic html/css code in the test file it shows up fine in the browser. I'm even using easy syntax to make sure it's nothing with the code I did <?php echo "Hello"; ?> and that does not show up at all. I just get a blank webpage. Any help on this would be great. Thank you!
4 Answers
Daniel Silva
10,644 PointsWhen, I preview the file this is the path it shows file:///C:/MAMP/htdocs/test.php. Any suggestions on how I can get it to show the correct address?
rhysadams
4,847 PointsPlease try loading http://localhost/test.php and see if that works
Daniel Silva
10,644 PointsOkay, I'm using Aptana studio 3. I'm new to this type of editor. Is there anything I need to do so that the file has http://localhost? I can't just put it in the address it self. I get a 404 error.
andi mitre
Treehouse Guest TeacherNot familiar with Aptana studio but when you start MAMP and get the two green lights that means that your local server is up and running. However your test.php file has to be in the directory which the apache server is running on. For MAMP the default document root c:\MAMP\htdocs is equivalent to http://localhost:8888 in your browser. Add /test.php to the end of the url after adding the file to the default document root on MAMP.
cheers
rhysadams
4,847 Pointsrhysadams
4,847 PointsWhat address are you visiting in your browser? It should be something along the lines of http://localhost/foldername or 127.0.0.1/foldername.
Thanks