PHP Programming

Showing All Errors in PHP

When I was first starting to create web sites with PHP, I struggled with getting error reporting turned on.  Turns out, that you can have it enable at the server, or in the document, or in both.  For development, it’s probably a good idea to have this at the top of script:

ini_set('display_errors', '1');

This will allow php to display all errors, notices, and warnings.  Simple things like developing with error reporting full on like this help prevent security breaches and unknown application behavior.

By Jack Slingerland

Founder of Working and living in Raleigh, NC. I manage a team of software engineers and work in Python, Django, TypeScript, Node.js, React+Redux, Angular, and PHP. I enjoy hanging out with my wife and son, lifting weights, and advancing in my free time.