You can configure the error display in two places in php.ini or directly in a file.
php.ini
Open the file and add or modify the line:
error_reporting = E_ALL | E_STRICT
This says to display all kinds of errors and warnings E_ALL
is enough but in php5.3 some warnings have been separated for E_STRICT
, so keeping both is more a matter of compatibility and certainty that all types of errors/warnings will be displayed.
By file
Can display errors/warnings of only one particular file with the use of functions error_reporting()
and ini_set()
.
The first function overwrites the default value (which comes from php.ini) of the directive display_errors
to display the errors another possible value to pass is -1
which has the same effect as true
. The second function sets the level of errors that will be displayed.
<?php
ini_set('display_errors', true);
error_reporting(E_ALL|E_STRICT);
$str = 'inválido'
I’m not sure I understand your question. But check out the Loglevel documentation (for example Loglevel debug rewrite:trace3) https://httpd.apache.org/docs/2.4/mod/core.html#loglevel
– Ivan Nack