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 Logging

Why does the PHP.ini file not show parse errors?

I'm not even sure what exactly the htaccess file is other than somehow another version of the settings configuration for the server errors like the php.ini file...but why can't the php.ini file show parse errors for production errors? Why is htaccess able to show them? Are there any errors that htaccess can't handle/"see" that php.ini can?

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there! As I understand it, php.ini file is used for configuration of the whole server, not just your site. So if this site were on a webhost instead of your local machine, chances are you wouldn't have access to the php.ini file at all. The htaccess file is only used when a directory or subdirectory is accessed.

I did however, find this on stack overflow which suggests that you can modify your php.ini file with display_errors = on. It seems this is disabled by default. However, keep in mind, that this will likely not be possible if dealing with someone else's server.

Hope this helps! :sparkles: