-, . . PHP.
?
PHP . — , — . .
, PHP . , , .
PHP php.ini. error_reporting, PHP. , , display_errors. , .
PHP :
, . , . E_ERROR, E_COMPILE_ERROR;
, . error_reporting : E_WARNING, E_NOTICE .
.
E_ERROR. , . ;
E_WARNING. , , - , . ;
E_NOTICE. , : , . ;
E_USER_ERROR. , ;
E_ALL. . , .
PHP
PHP , — . , , — php.ini. — display_errors error_reporting :
display_errors on
error_reporting E_ALL
.
, . Apache htaccess. . :
php_flag display_errors on
php_value error reporting -1
, ini_set(). , .
PHP . PHP , :
php.ini. . — log_errors = On, , . — error_log = / /.
htaccess. . php_value log_errors «on» php_value error_log / .
ini_set.
Error output in PHP is a necessary tool for debugging code. But it can also create potentially vulnerable areas. Therefore, you need to use this mechanism carefully and carefully. After the site or service has passed all stages of testing, you need to make sure that it does not display errors, with which the attacker can gain access to important data.