Extraño error de PHP

  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 27th, 2010, 10:10 pm

Tengo el siguiente código en index.php

PHP Código: [ Select ]
// Including the global file... without it, we don't have the system.
 
require_once "includesds/ineit.php";
  1. // Including the global file... without it, we don't have the system.
  2.  
  3. require_once "includesds/ineit.php";

Ese archivo no existe ni la carpeta y, sin embargo su no me da ningún error.

Estoy usando Ubuntu 10.10.

Volví a cargar apache y reinicia, pero sigue sin funcionar...Estoy empezando a odiar a Linux. Más problemas de su valor.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Octubre 27th, 2010, 10:10 pm

  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 27th, 2010, 11:26 pm

No importa, lo siguiente solucionado el problema.

PHP Código: [ Select ]
error_reporting(E_ALL);
 ini_set("display_errors", 1);
  1. error_reporting(E_ALL);
  2.  ini_set("display_errors", 1);



Tal vez soy sólo no tan bueno con la tecnología :lol: La culpa es de Linux...sólo lo hacen :lol:



Malos tiempo acostumbrarse a hacer las cosas por mí mismo.

Por cierto, ¿cómo puedo tener acceso a php.ini en Ubuntu? La carpeta php5 está bloqueado por alguna razón.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13458
  • Loc: Florida
  • Status: Offline

Nota Octubre 28th, 2010, 4:51 am

Quote:
Por cierto, ¿cómo puedo tener acceso a php.ini en Ubuntu? La carpeta php5 está bloqueado por alguna razón.


Si usted está conectado a través de SSH

BASH Código: [ Select ]
sudo nano /etc/php5/apache2/php.ini


Si usted está físicamente conectado a la computadora. (Nano funciona, pero creo que gedit es más fácil de usar si usted no está familiarizado con nano)

BASH Código: [ Select ]
sudo gedit /etc/php5/apache2/php.ini


Usted puede revisar la ruta PHP lleve a la práctica en cualquier secuencia de comandos con phpinfo ()
Strong with this one, the sudo is.
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • Avatar de Usuario
  • Registrado: May 22, 2004
  • Mensajes: 3415
  • Loc: Richland, WA
  • Status: Offline

Nota Octubre 28th, 2010, 6:40 am

Identificación recomienda ejecutar gksudo . Es probable que no tenga algún problema, pero su diseño de interfaces gráficas.

Código: [ Select ]
gksudo gedit /etc/php5/apache2/php.ini


http://psychocats.net/ubuntu/graphicalsudo
#define NULL (::rand() % 2)
  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 28th, 2010, 10:24 am

bien, pero lo que en el php.ini edito, y lo que puedo configurarlo para que para que el informe de errores?

He encontrado el siguiente en llegar:
Quote:
; Error_reporting

así que hice lo siguiente para
Quote:
error_reporting = en

Eso no funcionó, así que me quitó el = on y todavía no está funcionando.
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • Avatar de Usuario
  • Registrado: Dic 20, 2002
  • Mensajes: 8934
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Nota Octubre 28th, 2010, 10:25 am

¿Se acordó de reiniciar Apache después de hacer los cambios?
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 28th, 2010, 10:44 am

Ok, tengo el siguiente en mi archivo php.ini
Código: [ Select ]
display_errors
;  Default Value: On
;  Development Value: On
;  Production Value: Off

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

error_reporting
;  Default Value: E_ALL & ~E_NOTICE
;  Development Value: E_ALL | E_STRICT
;  Production Value: E_ALL & ~E_DEPRECATED
  1. display_errors
  2. ;  Default Value: On
  3. ;  Development Value: On
  4. ;  Production Value: Off
  5. ; display_startup_errors
  6. ;  Default Value: Off
  7. ;  Development Value: On
  8. ;  Production Value: Off
  9. error_reporting
  10. ;  Default Value: E_ALL & ~E_NOTICE
  11. ;  Development Value: E_ALL | E_STRICT
  12. ;  Production Value: E_ALL & ~E_DEPRECATED

Y se me ocurrió (el accidente) para reiniciar el equipo completo para apache es definitivamente reiniciado, pero sigue sin funcionar. (He hecho los cambios antes de que accidentalmente reinicie el equipo.


Me las arreglé para reiniciarlo por presionar accidentalmente el botón de reinicio en la torre cuando estaba desconectando los auriculares del conector.

[EDIT:] He probado los siguientes
Código: [ Select ]
display_errors = on
;  Default Value: On
;  Development Value: On
;  Production Value: Off

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

error_reporting = E_ALL | E_STRICT
;  Default Value: E_ALL & ~E_NOTICE
;  Development Value: E_ALL | E_STRICT
;  Production Value: E_ALL & ~E_DEPRECATED
  1. display_errors = on
  2. ;  Default Value: On
  3. ;  Development Value: On
  4. ;  Production Value: Off
  5. ; display_startup_errors
  6. ;  Default Value: Off
  7. ;  Development Value: On
  8. ;  Production Value: Off
  9. error_reporting = E_ALL | E_STRICT
  10. ;  Default Value: E_ALL & ~E_NOTICE
  11. ;  Development Value: E_ALL | E_STRICT
  12. ;  Production Value: E_ALL & ~E_DEPRECATED


Todavía no ha funcionado después de que reinicia apache
Código: [ Select ]
sudo /etc/init.d/apache2 restart
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • SpooF
  • ٩๏̯͡๏۶
  • Bronze Member
  • Avatar de Usuario
  • Registrado: May 22, 2004
  • Mensajes: 3415
  • Loc: Richland, WA
  • Status: Offline

Nota Octubre 28th, 2010, 10:51 am

¿El archivo se guardan de forma accidental antes de reiniciar el equipo?
#define NULL (::rand() % 2)
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13458
  • Loc: Florida
  • Status: Offline

Nota Octubre 28th, 2010, 11:22 am

En la parte superior de la página que está trabajando en el lugar de la siguiente.

INI Código: [ Select ]
<?php phpinfo(); exit; ?>


En la parte superior de la salida debería ver algo como esto.

Attachments:
ini-files.gif


Asegúrese de que está editando el archivo de la lista para "cargado de archivos de configuración". No sé por qué iba a cambiar, pero sólo toma un minuto para descartar.

Aquí está el contenido de la sección de informes de error para el servidor de Ubuntu he sentado a mi lado, que actualmente está configurado para mostrar todo lo que no anuncios.

Código: [ Select ]
;error_reporting = E_ALL & ~E_NOTICE
;
;  - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
;
;  - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
;
;  - Show all errors except for notices and coding standards warnings
;
error_reporting = E_ALL & ~E_NOTICE

; 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.
;
; possible values for display_errors:
;
; Off    - Do not display any errors
; stderr   - Display errors to STDERR (affects only CGI/CLI binaries!)
;
;display_errors = "stderr"
;
; stdout (On) - Display errors to STDOUT
;
display_errors = On

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = Off

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off

; Ignore source of message when ignoring repeated messages. When this setting
; is On you will not log errors with repeated messages from different files or
; source lines.
ignore_repeated_source = Off

; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This has only effect in a debug compile, and if
; error reporting includes E_WARNING in the allowed list
report_memleaks = On

;report_zend_debug = 0

; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off

; Disable the inclusion of HTML tags in error messages.
; Note: Never use this feature for production boxes.
;html_errors = Off

; If html_errors is set On PHP produces clickable error messages that direct
; to a page describing the error or function causing the error in detail.
; You can download a copy of the PHP manual from http://www.php.net/docs.php
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot.
; Note: Never use this feature for production boxes.
;docref_root = "/phpmanual/"
;docref_ext = .html

; String to output before an error message.
;error_prepend_string = "<font color=#ff0000>"

; String to output after an error message.
;error_append_string = "</font>"

; Log errors to specified file.
;error_log = filename

; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog
  1. ;error_reporting = E_ALL & ~E_NOTICE
  2. ;
  3. ;  - Show all errors, except for notices
  4. ;
  5. ;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
  6. ;
  7. ;  - Show only errors
  8. ;
  9. ;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
  10. ;
  11. ;  - Show all errors except for notices and coding standards warnings
  12. ;
  13. error_reporting = E_ALL & ~E_NOTICE
  14. ; Print out errors (as a part of the output). For production web sites,
  15. ; you're strongly encouraged to turn this feature off, and use error logging
  16. ; instead (see below). Keeping display_errors enabled on a production web site
  17. ; may reveal security information to end users, such as file paths on your Web
  18. ; server, your database schema or other information.
  19. ;
  20. ; possible values for display_errors:
  21. ;
  22. ; Off    - Do not display any errors
  23. ; stderr   - Display errors to STDERR (affects only CGI/CLI binaries!)
  24. ;
  25. ;display_errors = "stderr"
  26. ;
  27. ; stdout (On) - Display errors to STDOUT
  28. ;
  29. display_errors = On
  30. ; Even when display_errors is on, errors that occur during PHP's startup
  31. ; sequence are not displayed. It's strongly recommended to keep
  32. ; display_startup_errors off, except for when debugging.
  33. display_startup_errors = Off
  34. ; Log errors into a log file (server-specific log, stderr, or error_log (below))
  35. ; As stated above, you're strongly advised to use error logging in place of
  36. ; error displaying on production web sites.
  37. log_errors = Off
  38. ; Set maximum length of log_errors. In error_log information about the source is
  39. ; added. The default is 1024 and 0 allows to not apply any maximum length at all.
  40. log_errors_max_len = 1024
  41. ; Do not log repeated messages. Repeated errors must occur in same file on same
  42. ; line until ignore_repeated_source is set true.
  43. ignore_repeated_errors = Off
  44. ; Ignore source of message when ignoring repeated messages. When this setting
  45. ; is On you will not log errors with repeated messages from different files or
  46. ; source lines.
  47. ignore_repeated_source = Off
  48. ; If this parameter is set to Off, then memory leaks will not be shown (on
  49. ; stdout or in the log). This has only effect in a debug compile, and if
  50. ; error reporting includes E_WARNING in the allowed list
  51. report_memleaks = On
  52. ;report_zend_debug = 0
  53. ; Store the last error/warning message in $php_errormsg (boolean).
  54. track_errors = Off
  55. ; Disable the inclusion of HTML tags in error messages.
  56. ; Note: Never use this feature for production boxes.
  57. ;html_errors = Off
  58. ; If html_errors is set On PHP produces clickable error messages that direct
  59. ; to a page describing the error or function causing the error in detail.
  60. ; You can download a copy of the PHP manual from http://www.php.net/docs.php
  61. ; and change docref_root to the base URL of your local copy including the
  62. ; leading '/'. You must also specify the file extension being used including
  63. ; the dot.
  64. ; Note: Never use this feature for production boxes.
  65. ;docref_root = "/phpmanual/"
  66. ;docref_ext = .html
  67. ; String to output before an error message.
  68. ;error_prepend_string = "<font color=#ff0000>"
  69. ; String to output after an error message.
  70. ;error_append_string = "</font>"
  71. ; Log errors to specified file.
  72. ;error_log = filename
  73. ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
  74. ;error_log = syslog
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 28th, 2010, 11:29 am

Código: [ Select ]
/etc/php5/apache2/php.ini

Eso es lo que es. He cambiado el código de error a la nada lo que tienes, y todavía.

...
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • Avatar de Usuario
  • Registrado: Dic 20, 2002
  • Mensajes: 8934
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Nota Octubre 28th, 2010, 12:30 pm

Véase la parte donde Joebert hecho una captura de pantalla con respecto a la función phpinfo ()? ¿Podría ejecutar phpinfo () y pegar una captura de pantalla y para lo que se ve allí? Creo que podría ser muy útil. ¿Hay alguna php.ini archivos adicionales que se está analizando? ¿Tiene usted alguna en el directorio donde tienes el script para anular el php.ini principal? ¿Está utilizando los archivos. Htaccess o algo en el httpd.conf para anular cualquiera de los valores en el php.ini?
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 28th, 2010, 9:06 pm

Bien, aquí tienes. No creo que haya nada allí, pero...No sé mucho acerca de este :|
Attachments:
loaded files.png
"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13458
  • Loc: Florida
  • Status: Offline

Nota Octubre 29th, 2010, 3:12 am

Cuando se mira más abajo en la salida de php.ini en la sección "Configuración -> PHP Core" sección, tiene el "valor local" difieren de los "valores maestro" para cualquiera de las directivas de error relacionados? (Los de mi sección php.ini desde antes)

Si el "valor principal" es lo que esperamos que sea, "Sí" entonces se puede olvidar "/ etc/php5/apache2/php.ini" porque el maestro valores vienen de ese archivo. Si los valores de maestro no son lo que esperamos que sean, asegúrese de que sus ediciones con "/ etc/php5/apache2/php.ini" son en realidad de ser salvos antes de reiniciar (reinicio, no recarga) de Apache.

-

Usted puede saltar en busca de archivos php.ini en su directorio local, la versión de PHP apache_module obtener mediante el Administrador de Ubuntus paquete de los ignora. Cuando usted va a querer empezar a buscar es htaccess en el directorio que está trabajando, y cada uno de los directorios no pare.

Lo que usted está buscando en los archivos htaccess Bigwebmaster mencionado es líneas como esta

Código: [ Select ]
php_flag display_errors off
Strong with this one, the sudo is.
  • Bogey
  • Bogey
  • Genius
  • Avatar de Usuario
  • Registrado: Jul 14, 2005
  • Mensajes: 8212
  • Loc: USA
  • Status: Offline

Nota Octubre 29th, 2010, 9:03 am

No puse ninguna. Htaccess en cualquiera de los directorios. ¿Es necesario, para permitir que los errores?

Attachments:
php_info_core.gif

The PHP info

"Bring forth therefore fruits meet for repentance:" Matthew 3:8
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • Avatar de Usuario
  • Registrado: Dic 20, 2002
  • Mensajes: 8934
  • Loc: Seattle, WA & Phoenix, AZ
  • Status: Offline

Nota Octubre 29th, 2010, 9:23 am

Tu bandera display_errors está definitivamente fuera de la razón que sea. También podría poner un htaccess en su carpeta con el script PHP y añadir esta línea.:

Código: [ Select ]
php_flag display_errors on


A ver si eso cambia la salida de phpinfo ()
Ozzu Hosting - Want your website on a fast server like Ozzu?
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Octubre 29th, 2010, 9:23 am

Publicar Información

  • Total de mensajes en este tema: 17 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 182 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC