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 Listing Inventory Items Creating the Products Array

I mistyped $products = $array(); whenever I tried to load the page in MAMP, I got an internal server error 500.

I mistyped $products = $array(); whenever I tried to load the page in MAMP, I got an internal server error 500. Is there anything I can do to catch this error whereby PHP shows me the location as to where the mistake was happening?

1 Answer

are error settings set appropriately in php.ini?

display errors setting and catching all errors?

It might also be because of a fatal error php terminates and is unable to process any further because in the past when I have forgotten to set appropriate error settings, I would get a blank page on error not what you are getting