Debugging eduTrac SIS


If you are a developer, then you know that debugging is a very important task because you want to make sure that your software is bug free and secure. This article in the codex will take you through the different debugging tools and features found in eduTrac SIS.


The APP_ENV constant is found in the config.php file in the root of the installation. You will utilize this constant if you want to make sure everything is ok before rolling it out to the public. You will also utilize this constant if you are a plugin developer as well.

defined('APP_ENV') or define('APP_ENV', 'PROD');
defined('APP_ENV') or define('APP_ENV', 'DEV');

PHP Errors, Warning and Notices

By default, the constant is set to PROD, which means coding errors will not be printed on screen, but instead logged in an error file located in /app/tmp/logs/.

When you change it from PROD to DEV, then any and all errors will be printed to the screen. It is not wise to set this constant to DEV on production environments because the average user may not be able to interpret it, and it may also give away too much information to the wrong person.

Please note that if and when you come across error messages, not all of them allude to a problem or something that is serious. Some of them could be produced by not added error checking (i.e. error checking to make sure that something is an array and not a string).

Deprecated Functions, Arguments, Classes and Methods

When APP_ENV is set, it will also print notices about deprecated functions, arguments, classes and methods. Some of the messages printed will state if there is an alternative that should be used or not. There are a couple of reasons why something may become deprecated. One is that it is no longer needed and the other reason could be that is has been replaced with something different or better.