Skip to main content

Activar/desactivar el display de errores con PHP

En el archivo de configuración de PHP (php.ini), en la sección indicada a continuación, colocar el valor de la variable display_errors en "On" o en "Off" según sea el caso. Hay que tener en cuenta que por seguridad, en lo sitios de producción, el valor de esta variable debe estar en "Off"

.
.
.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.
.
.
; Print out errors (as a part of the output).  For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below).  Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On