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

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


+  Foro de elhacker.net
|-+  Programación
| |-+  Desarrollo Web
| | |-+  PHP (Moderador: #!drvy)
| | | |-+  error al ejecutar php
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: error al ejecutar php  (Leído 2,694 veces)
Drewermerc

Desconectado Desconectado

Mensajes: 259



Ver Perfil WWW
error al ejecutar php
« en: 26 Septiembre 2014, 20:50 pm »

Hola a todo.
Bueno el siguiente problema que tengo es que cuando intento acceder a una pagina .php por ejemplo index.php meda este error que no e podido solucionar ya intente des instalando apache y volviendo a instalar  tambien con xampp y no funciona estoy trabajando en debian.
y lo mas raro es que ayer si funcionaba bien.
Código
  1. Internal Server Error
  2. The server encountered an internal error or misconfiguration and was unable to complete your request.
  3. Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
  4. More information about this error may be available in the server error log.
  5. Apache/2.2.22 (Debian) Server at localhost Port 80
  6.  

Espero me puedan ayudar.
Saludos.
Drewermerc.


En línea

el-brujo
ehn
***
Desconectado Desconectado

Mensajes: 21.637


La libertad no se suplica, se conquista


Ver Perfil WWW
Re: error al ejecutar php
« Respuesta #1 en: 26 Septiembre 2014, 20:54 pm »

Pueden ser cientos de cosas, un internal server error del servidor web.

Primero mira el fichero error_log del apache, allí te saldrán pistas.

Pon aquí la configuración del fichero httpd.conf  del Apache, especialmente la parte del php


Citar

LoadModule php5_module        modules/libphp5.so

# inseguro .php.txt
#AddType application/x-httpd-php .php

# seguro
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>


En línea

Drewermerc

Desconectado Desconectado

Mensajes: 259



Ver Perfil WWW
Re: error al ejecutar php
« Respuesta #2 en: 26 Septiembre 2014, 23:05 pm »

Hola el-brujo.
gracias por responder.
mira aquí están access.log:
Código
  1. :1 - - [26/Sep/2014:14:37:16 -0500] "GET / HTTP/1.1" 200 484 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  2. ::1 - - [26/Sep/2014:14:37:17 -0500] "GET / HTTP/1.1" 304 209 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  3. ::1 - - [26/Sep/2014:14:37:17 -0500] "GET / HTTP/1.1" 304 209 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  4. ::1 - - [26/Sep/2014:14:37:18 -0500] "GET / HTTP/1.1" 304 209 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  5. ::1 - - [26/Sep/2014:14:37:20 -0500] "GET / HTTP/1.1" 304 209 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  6. 127.0.0.1 - - [26/Sep/2014:14:44:07 -0500] "GET / HTTP/1.1" 200 484 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  7. 127.0.0.1 - - [26/Sep/2014:14:44:08 -0500] "GET /favicon.ico HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  8. 127.0.0.1 - - [26/Sep/2014:14:45:31 -0500] "GET /aplications.html HTTP/1.1" 404 502 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  9. 127.0.0.1 - - [26/Sep/2014:14:45:40 -0500] "GET /applications.html HTTP/1.1" 404 503 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  10. 127.0.0.1 - - [26/Sep/2014:14:45:50 -0500] "GET /xampp HTTP/1.1" 404 496 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
  11.  

y el httpd.conf no lo encuentro crees que ese sea el problema solo encontré apache2.conf pero solo tiene esto.
Código
  1. # This is the main Apache server configuration file.  It contains the
  2. # configuration directives that give the server its instructions.
  3. # See http://httpd.apache.org/docs/2.2/ for detailed information about
  4. # the directives and /usr/share/doc/apache2-common/README.Debian.gz about
  5. # Debian specific hints.
  6. #
  7. #
  8. # Summary of how the Apache 2 configuration works in Debian:
  9. # The Apache 2 web server configuration in Debian is quite different to
  10. # upstream's suggested way to configure the web server. This is because Debian's
  11. # default Apache2 installation attempts to make adding and removing modules,
  12. # virtual hosts, and extra configuration directives as flexible as possible, in
  13. # order to make automating the changes and administering the server as easy as
  14. # possible.
  15.  
  16. # It is split into several files forming the configuration hierarchy outlined
  17. # below, all located in the /etc/apache2/ directory:
  18. #
  19. # /etc/apache2/
  20. # |-- apache2.conf
  21. # | `--  ports.conf
  22. # |-- mods-enabled
  23. # | |-- *.load
  24. # | `-- *.conf
  25. # |-- conf.d
  26. # | `-- *
  27. # `-- sites-enabled
  28. # `-- *
  29. #
  30. #
  31. # * apache2.conf is the main configuration file (this file). It puts the pieces
  32. #   together by including all remaining configuration files when starting up the
  33. #   web server.
  34. #
  35. #   In order to avoid conflicts with backup files, the Include directive is
  36. #   adapted to ignore files that:
  37. #   - do not begin with a letter or number
  38. #   - contain a character that is neither letter nor number nor _-:.
  39. #   - contain .dpkg
  40. #
  41. #   Yet we strongly suggest that all configuration files either end with a
  42. #   .conf or .load suffix in the file name. The next Debian release will
  43. #   ignore files not ending with .conf (or .load for mods-enabled).
  44. #
  45. # * ports.conf is always included from the main configuration file. It is
  46. #   supposed to determine listening ports for incoming connections, and which
  47. #   of these ports are used for name based virtual hosts.
  48. #
  49. # * Configuration files in the mods-enabled/ and sites-enabled/ directories
  50. #   contain particular configuration snippets which manage modules or virtual
  51. #   host configurations, respectively.
  52. #
  53. #   They are activated by symlinking available configuration files from their
  54. #   respective *-available/ counterparts. These should be managed by using our
  55. #   helpers a2enmod/a2dismod, a2ensite/a2dissite. See
  56. #   their respective man pages for detailed information.
  57. #
  58. # * Configuration files in the conf.d directory are either provided by other
  59. #   packages or may be added by the local administrator. Local additions
  60. #   should start with local- or end with .local.conf to avoid name clashes. All
  61. #   files in conf.d are considered (excluding the exceptions noted above) by
  62. #   the Apache 2 web server.
  63. #
  64. # * The binary is called apache2. Due to the use of environment variables, in
  65. #   the default configuration, apache2 needs to be started/stopped with
  66. #   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
  67. #   work with the default configuration.
  68.  
  69.  
  70. # Global configuration
  71. #
  72.  
  73. #
  74. # ServerRoot: The top of the directory tree under which the server's
  75. # configuration, error, and log files are kept.
  76. #
  77. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  78. # mounted filesystem then please read the LockFile documentation (available
  79. # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
  80. # you will save yourself a lot of trouble.
  81. #
  82. # Do NOT add a slash at the end of the directory path.
  83. #
  84. #ServerRoot "/etc/apache2"
  85.  
  86. #
  87. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  88. #
  89. LockFile ${APACHE_LOCK_DIR}/accept.lock
  90.  
  91. #
  92. # PidFile: The file in which the server should record its process
  93. # identification number when it starts.
  94. # This needs to be set in /etc/apache2/envvars
  95. #
  96. PidFile ${APACHE_PID_FILE}
  97.  
  98. #
  99. # Timeout: The number of seconds before receives and sends time out.
  100. #
  101. Timeout 300
  102.  
  103. #
  104. # KeepAlive: Whether or not to allow persistent connections (more than
  105. # one request per connection). Set to "Off" to deactivate.
  106. #
  107. KeepAlive On
  108.  
  109. #
  110. # MaxKeepAliveRequests: The maximum number of requests to allow
  111. # during a persistent connection. Set to 0 to allow an unlimited amount.
  112. # We recommend you leave this number high, for maximum performance.
  113. #
  114. MaxKeepAliveRequests 100
  115.  
  116. #
  117. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  118. # same client on the same connection.
  119. #
  120. KeepAliveTimeout 5
  121.  
  122. ##
  123. ## Server-Pool Size Regulation (MPM specific)
  124. ##
  125.  
  126. # prefork MPM
  127. # StartServers: number of server processes to start
  128. # MinSpareServers: minimum number of server processes which are kept spare
  129. # MaxSpareServers: maximum number of server processes which are kept spare
  130. # MaxClients: maximum number of server processes allowed to start
  131. # MaxRequestsPerChild: maximum number of requests a server process serves
  132. <IfModule mpm_prefork_module>
  133.    StartServers          5
  134.    MinSpareServers       5
  135.    MaxSpareServers      10
  136.    MaxClients          150
  137.    MaxRequestsPerChild   0
  138. </IfModule>
  139.  
  140. # worker MPM
  141. # StartServers: initial number of server processes to start
  142. # MinSpareThreads: minimum number of worker threads which are kept spare
  143. # MaxSpareThreads: maximum number of worker threads which are kept spare
  144. # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
  145. #              graceful restart. ThreadLimit can only be changed by stopping
  146. #              and starting Apache.
  147. # ThreadsPerChild: constant number of worker threads in each server process
  148. # MaxClients: maximum number of simultaneous client connections
  149. # MaxRequestsPerChild: maximum number of requests a server process serves
  150. <IfModule mpm_worker_module>
  151.    StartServers          2
  152.    MinSpareThreads      25
  153.    MaxSpareThreads      75
  154.    ThreadLimit          64
  155.    ThreadsPerChild      25
  156.    MaxClients          150
  157.    MaxRequestsPerChild   0
  158. </IfModule>
  159.  
  160. # event MPM
  161. # StartServers: initial number of server processes to start
  162. # MinSpareThreads: minimum number of worker threads which are kept spare
  163. # MaxSpareThreads: maximum number of worker threads which are kept spare
  164. # ThreadsPerChild: constant number of worker threads in each server process
  165. # MaxClients: maximum number of simultaneous client connections
  166. # MaxRequestsPerChild: maximum number of requests a server process serves
  167. <IfModule mpm_event_module>
  168.    StartServers          2
  169.    MinSpareThreads      25
  170.    MaxSpareThreads      75
  171.    ThreadLimit          64
  172.    ThreadsPerChild      25
  173.    MaxClients          150
  174.    MaxRequestsPerChild   0
  175. </IfModule>
  176.  
  177. # These need to be set in /etc/apache2/envvars
  178. User ${APACHE_RUN_USER}
  179. Group ${APACHE_RUN_GROUP}
  180.  
  181. #
  182. # AccessFileName: The name of the file to look for in each directory
  183. # for additional configuration directives.  See also the AllowOverride
  184. # directive.
  185. #
  186.  
  187. AccessFileName .htaccess
  188.  
  189. #
  190. # The following lines prevent .htaccess and .htpasswd files from being
  191. # viewed by Web clients.
  192. #
  193. <Files ~ "^\.ht">
  194.    Order allow,deny
  195.    Deny from all
  196.    Satisfy all
  197. </Files>
  198.  
  199. #
  200. # DefaultType is the default MIME type the server will use for a document
  201. # if it cannot otherwise determine one, such as from filename extensions.
  202. # If your server contains mostly text or HTML documents, "text/plain" is
  203. # a good value.  If most of your content is binary, such as applications
  204. # or images, you may want to use "application/octet-stream" instead to
  205. # keep browsers from trying to display binary files as though they are
  206. # text.
  207. #
  208. # It is also possible to omit any default MIME type and let the
  209. # client's browser guess an appropriate action instead. Typically the
  210. # browser will decide based on the file's extension then. In cases
  211. # where no good assumption can be made, letting the default MIME type
  212. # unset is suggested  instead of forcing the browser to accept
  213. # incorrect  metadata.
  214. #
  215. DefaultType None
  216.  
  217.  
  218. #
  219. # HostnameLookups: Log the names of clients or just their IP addresses
  220. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  221. # The default is off because it'd be overall better for the net if people
  222. # had to knowingly turn this feature on, since enabling it means that
  223. # each client request will result in AT LEAST one lookup request to the
  224. # nameserver.
  225. #
  226. HostnameLookups Off
  227.  
  228. # ErrorLog: The location of the error log file.
  229. # If you do not specify an ErrorLog directive within a <VirtualHost>
  230. # container, error messages relating to that virtual host will be
  231. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  232. # container, that host's errors will be logged there and not here.
  233. #
  234. ErrorLog ${APACHE_LOG_DIR}/error.log
  235.  
  236. #
  237. # LogLevel: Control the number of messages logged to the error_log.
  238. # Possible values include: debug, info, notice, warn, error, crit,
  239. # alert, emerg.
  240. #
  241. LogLevel warn
  242.  
  243. # Include module configuration:
  244. Include mods-enabled/*.load
  245. Include mods-enabled/*.conf
  246.  
  247. # Include list of ports to listen on and which to use for name based vhosts
  248. Include ports.conf
  249.  
  250. #
  251. # The following directives define some format nicknames for use with
  252. # a CustomLog directive (see below).
  253. # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
  254. #
  255. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  256. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  257. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  258. LogFormat "%{Referer}i -> %U" referer
  259. LogFormat "%{User-agent}i" agent
  260.  
  261. # Include of directories ignores editors' and dpkg's backup files,
  262. # see the comments above for details.
  263.  
  264. # Include generic snippets of statements
  265. Include conf.d/
  266.  
  267. # Include the virtual host configurations:
  268. Include sites-enabled/
  269.  
  270.  

Saludos.
Drewermerc.
En línea

Drewermerc

Desconectado Desconectado

Mensajes: 259



Ver Perfil WWW
Re: error al ejecutar php
« Respuesta #3 en: 28 Septiembre 2014, 04:13 am »

Hola a todos.
bueno pude solucionar lo del Inteval server error desinstalado todo y borrando lo archivos de su configuracion pero ahora tengo el problema que no puedo abrir ningun archivo .php se queda en blanco el navegador y no hace nada.
aqui les dejo lo que marca en access.log
Código
  1. ::1 - - [27/Sep/2014:21:08:58 -0500] "GET /proyecto/ HTTP/1.1" 304 211 "-" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
  2. ::1 - - [27/Sep/2014:21:08:58 -0500] "GET /proyecto/css/style-main.css HTTP/1.1" 304 210 "http://localhost/proyecto/" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
  3. ::1 - - [27/Sep/2014:21:08:58 -0500] "GET /proyecto/js/jquery-2.1.1.js HTTP/1.1" 304 212 "http://localhost/proyecto/" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
  4. ::1 - - [27/Sep/2014:21:09:06 -0500] "POST /proyecto/php/session.php HTTP/1.1" 500 274 "http://localhost/proyecto/" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
  5. ::1 - - [27/Sep/2014:21:09:12 -0500] "POST /proyecto/php/session.php HTTP/1.1" 500 274 "http://localhost/proyecto/" "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
  6.  

Bueno espero me puedan ayudar ya queno e podido encontrar una solucion.
Saludos.
Drewermerc.
« Última modificación: 28 Septiembre 2014, 04:20 am por Drewermerc » En línea

Drewermerc

Desconectado Desconectado

Mensajes: 259



Ver Perfil WWW
Re: error al ejecutar php
« Respuesta #4 en: 28 Septiembre 2014, 07:26 am »

Hola a todos.

Bueno pues ya pude solucionar mi error era un error de sintaxis por lo que no se ejecutaba  el codigo php.
Saludos.
Drewermerc.
En línea

#!drvy
Moderador
***
Desconectado Desconectado

Mensajes: 5.855



Ver Perfil WWW
Re: error al ejecutar php
« Respuesta #5 en: 28 Septiembre 2014, 15:21 pm »

Citar
Primero mira el fichero error_log del apache, allí te saldrán pistas.

Buenas, la próxima vez mira el error_log... no el access_log de apache.

Saludos
En línea

Drewermerc

Desconectado Desconectado

Mensajes: 259



Ver Perfil WWW
Re: error al ejecutar php
« Respuesta #6 en: 28 Septiembre 2014, 18:04 pm »

Hola #!drvy.
Que descuidado creo que tengo que leer con mas atención por que según yo había leído access.log.
bueno muchas gracias por volverme a decir sobre el error.log.
Saludos.
Drewermerc. 
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Error al ejecutar un EXE con C#
.NET (C#, VB.NET, ASP)
The_Saint 6 4,580 Último mensaje 6 Mayo 2013, 02:53 am
por kub0x
error ejecutar vbs desde tarea programada error el sistema no puede encontrar el
Scripting
binario010101 2 8,115 Último mensaje 1 Mayo 2014, 00:54 am
por binario010101
Error al ejecutar mysqldump
Programación General
vitorr 0 1,921 Último mensaje 29 Octubre 2014, 18:27 pm
por vitorr
error al ejecutar consulta
.NET (C#, VB.NET, ASP)
Joe Fraddy 5 2,937 Último mensaje 14 Enero 2016, 14:55 pm
por eLank0
error al ejecutar i2p
GNU/Linux
Samurai Blanco 3 2,429 Último mensaje 26 Junio 2016, 19:40 pm
por engel lex
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines