Foros del Web » Programando para Internet » PHP »

Diferencia entre PHP Notice y PHP Warning

Estas en el tema de Diferencia entre PHP Notice y PHP Warning en el foro de PHP en Foros del Web. Hola a todos, me gustaria saber la diferencia entre PHP Notice y PHP Warning ya que tengo el siguiente log de errores en Apache. Tambien ...
  #1 (permalink)  
Antiguo 02/01/2009, 06:04
 
Fecha de Ingreso: agosto-2007
Mensajes: 248
Antigüedad: 16 años, 7 meses
Puntos: 1
Diferencia entre PHP Notice y PHP Warning

Hola a todos, me gustaria saber la diferencia entre PHP Notice y PHP Warning ya que tengo el siguiente log de errores en Apache. Tambien me gustaria que me comentarais que debo hacer para solucionar ambos problemas en el siguiente log.
Le estoy dando vueltas pero no consigo quitarlos del log de Apache.
Muchas Gracias de antemano

Código:
[Fri Jan 02 13:00:20 2009] [error] [client 127.0.0.1] PHP Notice:  A session had already been started - ignoring session_start() in C:\\Web\\php\\PuntosDeVenta\\revistas_mostrarlistado.php on line 7, referer: http://localhost/php/PuntosDeVenta/parteizquierda.php
[Fri Jan 02 13:00:20 2009] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent by (output started at C:\\Web\\php\\PuntosDeVenta\\revistas_mantenimiento.php:131) in C:\\Web\\php\\PuntosDeVenta\\vaciar_cache.php on line 7, referer: http://localhost/php/PuntosDeVenta/parteizquierda.php
[Fri Jan 02 13:00:20 2009] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent by (output started at C:\\Web\\php\\PuntosDeVenta\\revistas_mantenimiento.php:131) in C:\\Web\\php\\PuntosDeVenta\\vaciar_cache.php on line 8, referer: http://localhost/php/PuntosDeVenta/parteizquierda.php
[Fri Jan 02 13:00:24 2009] [error] [client 127.0.0.1] PHP Notice:  A session had already been started - ignoring session_start() in C:\\Web\\php\\PuntosDeVenta\\revistas_mostrarlistado.php on line 7, referer: http://localhost/php/PuntosDeVenta/revistas_mantenimiento.php
[Fri Jan 02 13:00:24 2009] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent by (output started at C:\\Web\\php\\PuntosDeVenta\\revistas_mantenimiento.php:131) in C:\\Web\\php\\PuntosDeVenta\\vaciar_cache.php on line 7, referer: http://localhost/php/PuntosDeVenta/revistas_mantenimiento.php
[Fri Jan 02 13:00:24 2009] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent by (output started at C:\\Web\\php\\PuntosDeVenta\\revistas_mantenimiento.php:131) in C:\\Web\\php\\PuntosDeVenta\\vaciar_cache.php on line 8, referer: http://localhost/php/PuntosDeVenta/revistas_mantenimiento.php
[Fri Jan 02 13:00:25 2009] [error] [client 127.0.0.1] PHP Notice:  A session had already been started - ignoring session_start() in C:\\Web\\php\\PuntosDeVenta\\revistas_mostrarlistado.php on line 7, referer: http://localhost/php/PuntosDeVenta/revistas_mantenimiento.php?revista=Elle&codigo=002&abreviatura=ELL&id_revista=2
[Fri Jan 02 13:00:25 2009] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent by (output started at C:\\Web\\php\\PuntosDeVenta\\revistas_mantenimiento.php:131) in C:\\Web\\php\\PuntosDeVenta\\vaciar_cache.php on line 7, referer: http://localhost/php/PuntosDeVenta/revistas_mantenimiento.php?revista=Elle&codigo=002&abreviatura=ELL&id_revista=2
[Fri Jan 02 13:00:25 2009] [error] [client 127.0.0.1] PHP Warning:  Cannot modify header information - headers already sent by (output started at C:\\Web\\php\\PuntosDeVenta\\revistas_mantenimiento.php:131) in C:\\Web\\php\\PuntosDeVenta\\vaciar_cache.php on line 8, referer: http://localhost/php/PuntosDeVenta/revistas_mantenimiento.php?revista=Elle&codigo=002&abreviatura=ELL&id_revista=2
  #2 (permalink)  
Antiguo 02/01/2009, 07:44
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Diferencia entre PHP Notice y PHP Warning

bueno, es muy simple....

un Warning es una advertencia del interprete de PHP, osea... es de importancia!
un Notice, es una noticia... tan solo para que notes que falla algo, no es fatal... pero duele!


ahora, deduzco que el notice te sale por que se repite mucho session_start() osea... solo debe llamarse una sola ves... tal ves, tengas esta sentencia en varios lugares, en includes, etc, etc... ¿entiendes eso??


el warning, indica que no puedes enviar algun header() o set_cookie() después de generar "alguna salida" hacia el navegador.... eso es simple, revisa las FAQ's del foro.... ahí esta una buena explicación al respecto!!


NOTA que debes leer en el manual de PHP al respecto, ahí hay mucho mas información de la que te comento... por favor, empieza a documentarte...


¿listo??
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 03/01/2009, 08:58
 
Fecha de Ingreso: agosto-2007
Mensajes: 248
Antigüedad: 16 años, 7 meses
Puntos: 1
Respuesta: Diferencia entre PHP Notice y PHP Warning

Gracias pateketrueke seguiré tu consejo.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:31.