elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web (Moderador: #!drvy)
| | |-+  Habilitar error_reporting en Apache2 (Ubuntu 12.04)
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Habilitar error_reporting en Apache2 (Ubuntu 12.04)  (Leído 3,107 veces)
[u]nsigned


Desconectado Desconectado

Mensajes: 2.397

JS/Node developer


Ver Perfil WWW
Habilitar error_reporting en Apache2 (Ubuntu 12.04)
« en: 16 Junio 2015, 22:26 pm »

Hola! Les cuento que tengo un servidor casero montado en ubuntu 12.04. Le instale un stack LAMP desde los repositorios. Por defecto no me muestra ningun tipo de error, no me deja suar la funcion error_reporting. Asi que busque un poco y modifique todos mis archivos php.ini

/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini

Y quedaorn asi

Luego reinicie apache:
sudo service apache2 restart

Pero sin ver ningun error de php  :huh:


En línea

No hay atajo ante la duda, el misterio se hace aquí...
Se hace carne en cada uno, el misterio es existir!
MinusFour
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.529


I'm fourth.


Ver Perfil WWW
Re: Habilitar error_reporting en Apache2 (Ubuntu 12.04)
« Respuesta #1 en: 16 Junio 2015, 23:27 pm »

En la sección:

Código:
; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; It's recommended that errors be logged on production servers rather than
; having the errors sent to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off

display_errors lo tienes que poner a On.

Tambien puedes hacer:

Código
  1. ini_set('display_errors', '1');

El php.ini que se usa es el que esta en /etc/php5/apache2


En línea

[u]nsigned


Desconectado Desconectado

Mensajes: 2.397

JS/Node developer


Ver Perfil WWW
Re: Habilitar error_reporting en Apache2 (Ubuntu 12.04)
« Respuesta #2 en: 17 Junio 2015, 02:01 am »

Citar
display_errors = On
;   Default Value: On
;   Development Value: On
;   Production Value: Off

display_startup_errors = On
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

error_reporting = E_ALL
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED

Lo tengo asi, reinicie apache pero nada, sigo sin ver errores, simplemente arroja una pagina en blanco cuando hay un error en php.
En línea

No hay atajo ante la duda, el misterio se hace aquí...
Se hace carne en cada uno, el misterio es existir!
MinusFour
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.529


I'm fourth.


Ver Perfil WWW
Re: Habilitar error_reporting en Apache2 (Ubuntu 12.04)
« Respuesta #3 en: 17 Junio 2015, 04:35 am »

Lo tengo asi, reinicie apache pero nada, sigo sin ver errores, simplemente arroja una pagina en blanco cuando hay un error en php.

Esa no es la sección que puse. De hecho, esa sección que has puesto me desconcertó un poco, no esta en mi php.ini pero si revisas el header:

Citar
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
; The following are all the settings which are different in either the production
; or development versions of the INIs with respect to PHP's default behavior.
; Please see the actual settings later in the document for more details as to why
; we recommend these changes in PHP's behavior.

En otras palabras, esa sección entera es de referencia y creo que te has confundido descomentado esas lineas. Las settings estan mas adelante, usa el bloque que he pegado para referencia.
En línea

[u]nsigned


Desconectado Desconectado

Mensajes: 2.397

JS/Node developer


Ver Perfil WWW
Re: Habilitar error_reporting en Apache2 (Ubuntu 12.04)
« Respuesta #4 en: 21 Junio 2015, 17:49 pm »

Esa fue la sección quie edite, especificamente esta:
Código:
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
; The following are all the settings which are different in either the production
; or development versions of the INIs with respect to PHP's default behavior.
; Please see the actual settings later in the document for more details as to why
; we recommend these changes in PHP's behavior.

; allow_call_time_pass_reference
;   Default Value: On
;   Development Value: Off
;   Production Value: Off

display_errors = On
;   Default Value: On
;   Development Value: On
;   Production Value: Off

display_startup_errors = On
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

error_reporting = E_ALL
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED

De la linea 86 a la 112.

Podrias pasarme un copia de tu php.ini para ponerlo tal cual? Usas Ubuntu 12.04?

Muchas gracias!!!

Alguien tiene alguna sugerencia o algo? ya probé todo lo que encontre en Google y nada, sigo sin ver errores en mi LAMP xD
« Última modificación: 21 Junio 2015, 17:56 pm por [u]nsigned » En línea

No hay atajo ante la duda, el misterio se hace aquí...
Se hace carne en cada uno, el misterio es existir!
MinusFour
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.529


I'm fourth.


Ver Perfil WWW
Re: Habilitar error_reporting en Apache2 (Ubuntu 12.04)
« Respuesta #5 en: 21 Junio 2015, 18:54 pm »

Mi php.ini es de arch y yo tengo apagado los errores. Si ves mi primer post:

En la sección:

Código:
; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; It's recommended that errors be logged on production servers rather than
; having the errors sent to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off

Esta sección que te pase, la copie directamente de tu php.ini que pusiste al inicio, como puedes ver al final del bloque dice:

Código:
display_errors = Off

Esta es la sección que tenias que haber modificado.
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
duda sobre error_reporting y SQLi
Nivel Web
Belial & Grimoire 9 4,292 Último mensaje 25 Agosto 2012, 19:40 pm
por int_0x40
Habilitar y desactivar acceso remoto a phpmyadmin en ubuntu
GNU/Linux
Carlos3432 1 4,733 Último mensaje 25 Mayo 2014, 22:18 pm
por ccrunch
ubuntu problem detected [Apache2 CGI C++]
Programación C/C++
xkiz ™ 2 2,164 Último mensaje 19 Octubre 2014, 00:23 am
por xkiz ™
Ayuda: Configurar interfaz CGI en apache2 en Ubuntu
Desarrollo Web
erest0r 0 1,497 Último mensaje 3 Julio 2015, 10:01 am
por erest0r
Habilitar gráfica dedicada en Ubuntu 18.04 « 1 2 3 »
GNU/Linux
EntidadX 22 10,197 Último mensaje 14 Septiembre 2019, 19:32 pm
por Machacador
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines