How do I enable error messages so they display in the browser?

If you are having trouble getting error messages to display in your browser then you should edit your local php.ini with the following directives. The local php.ini is located at ~/.php/php.ini.

$ vi ~/.php/php.ini

Then add the following lines:

error_reporting = E_ALL
display_errors = 1
display_startup_errors = 1

You may learn more about the PHP runtime configuration by browsing the man page.