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)
| | |-+  Warning omitir el aviso en php
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Warning omitir el aviso en php  (Leído 1,803 veces)
mysqlway

Desconectado Desconectado

Mensajes: 20


Ver Perfil
Warning omitir el aviso en php
« en: 20 Diciembre 2014, 19:42 pm »

Hola,

Quiero omitir los mensajes de Notificaciones y warning de php.

HE conseguido omitir las notificaciones pero me sigue apareciendo un mensaje así:

Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in C:\xampp\htdocs\TUG\ficha.php on line 212

Estoy configurando el ini pero con estos parámetros no me lo omite qué puede faltar?

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



; error_reporting
;   Default Value: E_ALL  & ~E_NOTICE  & ~E_WARNING
;   Development Value: E_ALL & ~E_NOTICE  & ~E_WARNING
;   Production Value: E_ALL   & ~E_WARNING & ~E_STRICT & ~E_NOTICE



; Eval the expression with current error_reporting().  Set to true if you want
; error_reporting: E_ALL  & ~E_NOTICE & ~E_WARNING around the eval().
; http://php.net/assert.quiet-eval
;assert.quiet_eval: E_ALL & ~E_WARNING


En línea

MinusFour
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.529


I'm fourth.


Ver Perfil WWW
Re: Warning omitir el aviso en php
« Respuesta #1 en: 20 Diciembre 2014, 19:51 pm »

Lo que has puesto son comentarios, no hay ninguna configuracion reflejada en lo que has puesto. Observa mi configuracion, la ultima linea no tiene ';' lo demas si (son comentarios).

Código
  1. ; This directive controls whether or not and where PHP will output errors,
  2. ; notices and warnings too. Error output is very useful during development, but
  3. ; it could be very dangerous in production environments. Depending on the code
  4. ; which is triggering the error, sensitive information could potentially leak
  5. ; out of your application such as database usernames and passwords or worse.
  6. ; For production environments, we recommend logging errors rather than
  7. ; sending them to STDOUT.
  8. ; Possible Values:
  9. ;   Off = Do not display any errors
  10. ;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
  11. ;   On or stdout = Display errors to STDOUT
  12. ; Default Value: On
  13. ; Development Value: On
  14. ; Production Value: Off
  15. ; http://php.net/display-errors
  16. display_errors = Off

Tambien asegurate que estes modificando el php.ini correcto.

Otra cosa que puedes usar es ponerle un @ a las lineas que arrojan warnings:

Código

http://php.net/manual/en/language.operators.errorcontrol.php


« Última modificación: 20 Diciembre 2014, 19:55 pm por MinusFour » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Omitir Teclas F1, F3.
Programación Visual Basic
ezdookie 1 1,335 Último mensaje 19 Diciembre 2005, 18:54 pm
por NYlOn
ayuda warning php
PHP
kakashi20 6 5,911 Último mensaje 17 Septiembre 2009, 19:25 pm
por Jubjub
warning en C++
Programación C/C++
misterharry 9 4,892 Último mensaje 27 Junio 2010, 10:42 am
por leogtz
Warning con sesiones
PHP
sexto 2 2,034 Último mensaje 4 Noviembre 2010, 09:37 am
por sexto
Mi amigo hay vídeos que no se le abren dice cerrar o omitir « 1 2 »
Windows
Terminator5 10 5,199 Último mensaje 24 Agosto 2022, 13:39 pm
por ElMag0
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines