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 Setup Your Local Development Environment

Turn on errors

When trying to turn on errors in MAMP, I copied and pasted the url shown in step 1. All i get is a blank page. Because of this, I cannot complete step 2. I believe this is because I had to change ports. Can anyone help me turn on errors?

Alena Holligan
Alena Holligan
Treehouse Teacher

Make sure your "Server" is running before you try to access the page, and like Aleksandra Wzorek said, if you are using a non standard port, the path would be: http://localhost:**port_number_here**/MAMP/index.php?language=English&page=phpinfo

But, for reference, for PHP 5.6.10 which is by default what MAMP uses at the time of this video, the php.ini file is located here:

/Applications/MAMP/bin/php/php5.6.10/conf/php.ini

2 Answers

Norman,

You can simply use your computer's search tool to search for the php.ini file. Unless you have saved other php.ini files on your computer, the php.ini file that your computer's search finds should be the one for your MAMP installation. I personally use WAMP for my development so I don't necessarily know off the top of my head where the php.ini file is located in MAMP. Once you find the php.ini file on your computer, you can create a shortcut to that file for future use. Also, MAMP should have something on your computer's toolbar that you can click on. From there it should give you the option to access the file directly. Of course I may be wrong seeing as I use WAMP but the search tactic should work for you. Hope this helps.

Cheers!

Aleksandra Wzorek
Aleksandra Wzorek
6,076 Points

If you want to do it step by step as it is written in teacher's notes, and you have changed the ports, you have to simply add port number to localhost (so the path would be: http://localhost:port_number_here/MAMP/index.php?language=English&page=phpinfo). At least it worked for me.