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!

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 The php.ini File

eh... ?!!?!!?

It is unclear what environment (Mamp ? Atom?) is being used and how the server files are being set up. I have done the PHP: Installing a Local Dev Environment course, yet I am lost.

1 Answer

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,250 Points

The first thing is that MAMP and Atom are 2 different things. MAMP is the local server environment that provides the php.ini file and atom is the text editor that you might use to edit it. You can also other local servers like XAMPP or DesktopServer to manage your local environment.

I would urge you to watch the video again and check out the teachers notes for information about how to read the file and the things you can do with it. Unfortunately, there isn't much the scope of the course can do to explain absolutely everything about php.ini but there's enough to get you going and to get your comfortable with seeing what options are available and how to change them.

Thank you for your answer.

I had to understand that displaying the phpinfo.php page allows you to get the path to the php.ini file. So in order to do that : download the phpinfo.php file (in the downloads) and place it in the project file of your currently hosted MAMP site (In MAMP, select MAMP menu, Preferences, Web Server tab, Document Root is the project file of the currently hosted website). Turn on your server and click "Open WebStart page". In the address bar write http://localhost/phpinfo.php and the phpinfo.php page will be displayed. *A phpinfo.php page is basically just a phpinfo(); function ran on a php page.

So yeah, once you display your page, then get the php.ini file path (for me it was next to "Loaded Configuration File", right under "Configuration File (php.ini) Path"). If you are on Windows, find the file and open it on a notepad, you can edit the file there. Don't forget to save when you are done editing.