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 Getting Started with PHP Install PHP on Mac OS X

Jesse Fister
Jesse Fister
11,968 Points

Forbidden You don't have permission to access / on this server??

not sure why I am receiving the message "Forbidden

You don't have permission to access / on this server."

I have successfully downloaded MAMP and using port 80. I am using Sublime Text Editor and when I type local host it is giving me the "Forbidden..." message. Anyone have a thought?

Thanks!

3 Answers

If you try localhost:8888, does this do anything? Also have you tried restarting MAMP?

if you create a page called test.php inside the htdocs (or whereever you're pointing your root) what happens fi you go to localhost/test.php

<?php

// test.php

echo "I am alive";
exit;

Do you see the message?

Also try going to the htdocs folder (/Applications/MAMP/htdocs/) and check the permissions on that folder - do you have read and right permissions? Right click on the htdocs folder, click 'get info' and permissions should be at the bottom. There should be an option to push to all child directories and files - do this.

Also try take a look at /Applications/MAMP/apache_error.log

you can get a 'live feed' of errors by doing this in the command line:

tail -f /Applications/MAMP/apache_error.log

Jesse Fister
Jesse Fister
11,968 Points

Thanks for your help, Tom. I restarted MAMP and it worked just fine.

Karl Kaufmann
PLUS
Karl Kaufmann
Courses Plus Student 3,868 Points

Another thing to checkโ€”generally, on Web servers, you need an index file in the root folder in order to access other content. I tested this in MAMP myself, and this is generally the solution.