Foros del Web » Programando para Internet » PHP » Symfony »

error 500 en symfony

Estas en el tema de error 500 en symfony en el foro de Symfony en Foros del Web. Hola compañeros pues aqui con un problema he estado tratando de echar andar symfony en mi maquina pero nomas no doy , tengo un wampserver ...
  #1 (permalink)  
Antiguo 23/05/2013, 12:30
 
Fecha de Ingreso: enero-2011
Ubicación: DF
Mensajes: 898
Antigüedad: 13 años, 2 meses
Puntos: 155
error 500 en symfony

Hola compañeros pues aqui con un problema he estado tratando de echar andar symfony en mi maquina pero nomas no doy , tengo un wampserver 2.2 en mi maquina, con mod-rewrite activo

y estaba siguiendo este tutorial del sitio de symfony

http://symfony.com/doc/current/quick...g_picture.html

ahora el problema es que a la hora de que en el tutorial me pide que intente accesar a http://localhost/Symfony/web/config.php me marca un error 500




algo raro extra que veo es que en la carpeta de http://localhost/Symfony/ no se ve la carpeta web



aun cuando en el directorio si la veo



este es el .htaccess que tengo en la carpeta web


Código:
# Use the front controller as index file. It serves as fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# startpage (path "/") because otherwise Apache will apply the rewritting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex app.php

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Redirect to URI without front controller to prevent duplicate content
    # (with and without `/app.php`). Only do this redirect on the initial
    # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
    # endless redirect loop (request -> rewrite to front controller ->
    # redirect -> request -> ...).
    # So in case you get a "too many redirects" error or you always get redirected
    # to the startpage because your Apache does not expose the REDIRECT_STATUS
    # environment variable, you have 2 choices:
    # - disable this feature by commenting the following 2 lines or
    # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
    #   following RewriteCond (best solution)
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^app\.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]

    # If the requested filename exists, simply serve it.
    # We only want to let Apache serve files and not directories.
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule .? - [L]

    # The following rewrites all other queries to the front controller. The
    # condition ensures that if you are using Apache aliases to do mass virtual
    # hosting, the base path will be prepended to allow proper resolution of the
    # app.php file; it will work in non-aliased environments as well, providing
    # a safe, one-size fits all solution.
    RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
    RewriteRule ^(.*) - [E=BASE:%1]
    RewriteRule .? %{ENV:BASE}app.php [L]
</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        # When mod_rewrite is not available, we instruct a temporary redirect of
        # the startpage to the front controller explicitly so that the website
        # and the generated links can still be used.
        RedirectMatch 302 ^/$ /app.php/
        # RedirectTemp cannot be used instead
    </IfModule>
</IfModule>
y en el log de errores de apache me aparece esto : F:/wamp/www/Symfony/web/.htaccess: DirectoryIndex not allowed here


alguna idea o solución a esto que les halla pasado? he andado googleando pero las soluciones como que no me han dado algo concreto, gracias de antemano
__________________
No me interesan ni las gracias ni los karmas , pero si que se genere conocimiento, si se dio con la respuesta por favor confirmalo
  #2 (permalink)  
Antiguo 23/05/2013, 20:41
Avatar de fhederico  
Fecha de Ingreso: agosto-2009
Mensajes: 247
Antigüedad: 14 años, 8 meses
Puntos: 23
Respuesta: error 500 en symfony

Hola,

Estas cargando mal el archivo, la logica es asi

Código:
app.php -> Produccion

app_dev.php -> Desarrollo
En tu archivo .htaccess cambia app.php por app_dev.php

Tambien puedes acceder

http://localhost/Symfony/web/app_dev.php

Con eso deberia cargarte sin problemas, pero si quieres que el cambio sea permanente, modifica el .htaccess
  #3 (permalink)  
Antiguo 23/05/2013, 22:08
 
Fecha de Ingreso: enero-2011
Ubicación: DF
Mensajes: 898
Antigüedad: 13 años, 2 meses
Puntos: 155
Respuesta: error 500 en symfony

ya modifique el .htaccess, me quedo asi :

Código:
# Use the front controller as index file. It serves as fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# startpage (path "/") because otherwise Apache will apply the rewritting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex app_dev.php  #aqui

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Redirect to URI without front controller to prevent duplicate content
    # (with and without `/app.php`). Only do this redirect on the initial
    # rewrite by Apache and not on subsequent cycles. Otherwise we would get an
    # endless redirect loop (request -> rewrite to front controller ->
    # redirect -> request -> ...).
    # So in case you get a "too many redirects" error or you always get redirected
    # to the startpage because your Apache does not expose the REDIRECT_STATUS
    # environment variable, you have 2 choices:
    # - disable this feature by commenting the following 2 lines or
    # - use Apache >= 2.3.9 and replace all L flags by END flags and remove the
    #   following RewriteCond (best solution)
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^app_dev\.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]

#aqui    

    # If the requested filename exists, simply serve it.
    # We only want to let Apache serve files and not directories.
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule .? - [L]

    # The following rewrites all other queries to the front controller. The
    # condition ensures that if you are using Apache aliases to do mass virtual
    # hosting, the base path will be prepended to allow proper resolution of the
    # app.php file; it will work in non-aliased environments as well, providing
    # a safe, one-size fits all solution.
    RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
    RewriteRule ^(.*) - [E=BASE:%1]
    RewriteRule .? %{ENV:BASE}app_dev.php [L]
#aqui

</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        # When mod_rewrite is not available, we instruct a temporary redirect of
        # the startpage to the front controller explicitly so that the website
        # and the generated links can still be used.
        RedirectMatch 302 ^/$ /app_dev.php/
#aqui

        # RedirectTemp cannot be used instead
    </IfModule>
</IfModule>
aun asi apuntando a
http://localhost/Symfony/web/app_dev.php

y a

http://localhost/Symfony/web/config.php

me sigue marcando el mismo error 500 , alguna idea?
__________________
No me interesan ni las gracias ni los karmas , pero si que se genere conocimiento, si se dio con la respuesta por favor confirmalo
  #4 (permalink)  
Antiguo 24/05/2013, 00:04
Avatar de masterpuppet
Software Craftsman
 
Fecha de Ingreso: enero-2008
Ubicación: Montevideo, Uruguay
Mensajes: 3.550
Antigüedad: 16 años, 3 meses
Puntos: 845
Respuesta: error 500 en symfony

Pregunta tonta, tienes activado mod_rewrite ?
__________________
http://es.phptherightway.com/
thats us riders :)
  #5 (permalink)  
Antiguo 24/05/2013, 11:04
Avatar de abimex
Colaborador
 
Fecha de Ingreso: marzo-2007
Ubicación: ~
Mensajes: 751
Antigüedad: 17 años, 1 mes
Puntos: 137
Respuesta: error 500 en symfony

pienso yo que es algo de los permisos, pero como no se mucho de windows no se si ahi tambien apliquen
__________________
>> abimaelmartell.com
  #6 (permalink)  
Antiguo 24/05/2013, 11:55
Avatar de fhederico  
Fecha de Ingreso: agosto-2009
Mensajes: 247
Antigüedad: 14 años, 8 meses
Puntos: 23
Respuesta: error 500 en symfony

No, en Windows no requiere permisos, el Wampserver normalmente funciona sin problemas, puede ser como dice @masterpuppet, alguna libreria que no esta correctamente iniciada.

Deten los servicios de WampServer, andate a la carpeta de instalacion, normalmente es la:

Código:
C:\wamp
Aqui, ingresa a

Código:
C:\wamp\logs
Borra los 3 archivos, e inicia los servicios nuevamente. Por ultimo intenta cargar la pagina, cuando te muestre el error revisa los archivos de logs que tienes ahi, te mostrara el porque del error

Saludos
  #7 (permalink)  
Antiguo 24/05/2013, 12:22
 
Fecha de Ingreso: enero-2011
Ubicación: DF
Mensajes: 898
Antigüedad: 13 años, 2 meses
Puntos: 155
Respuesta: error 500 en symfony

Hola pues no , la verdad no se me hace tonta la pregunta --de que estuviera activo el mod-rewrite-- a lo mejor por ahi va la respuesta,de hecho tengo la aplicacion de zend framework de este tutorial

http://framework.zend.com/manual/2.2.../overview.html

funcionando sobre el mismo servidor y para lograrlo hice esto:

puse en mi httpd.conf esta parte

Código:
 Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
#    Deny from all
</Directory>
y habilite el modulo en el wampserver




basandome en este video

http://www.zendcasts.com/getting-sta...erver/2009/06/

crees que debe tener otra configuracion master??


en cuanto a los permisos acabo de ver que la carpeta web tiene permisos de solo lectura , ya se los cambie y renicie el apache pero me sigue saliendo el mismo error, a lo mejor si es algo de permisos pero que? por que como puse al inicio apache no ve la carpeta web pero si esta en el sistema operativo





segui las indicaciones que me dijiste de borrar los logs y reinicie el apache al ver el log me sale este error, pero igual me sigue saliendo el error 500

Código:
F:/wamp/www/Symfony/web/.htaccess: DirectoryIndex not allowed here

sabes a que se refiere , gracias por su apoyo compañeros
__________________
No me interesan ni las gracias ni los karmas , pero si que se genere conocimiento, si se dio con la respuesta por favor confirmalo
  #8 (permalink)  
Antiguo 24/05/2013, 13:17
Avatar de abimex
Colaborador
 
Fecha de Ingreso: marzo-2007
Ubicación: ~
Mensajes: 751
Antigüedad: 17 años, 1 mes
Puntos: 137
Respuesta: error 500 en symfony

cambia
AllowOverride None
por
AllowOverride All
mira esto -> http://httpd.apache.org/docs/current...#allowoverride
__________________
>> abimaelmartell.com
  #9 (permalink)  
Antiguo 24/05/2013, 14:19
 
Fecha de Ingreso: enero-2011
Ubicación: DF
Mensajes: 898
Antigüedad: 13 años, 2 meses
Puntos: 155
Respuesta: error 500 en symfony

ya lo cambie y lo puse así en el httpd.conf


Código:
<Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
#    Deny from all
</Directory>
reinicie el apache y me sigue saliendo el error 500
__________________
No me interesan ni las gracias ni los karmas , pero si que se genere conocimiento, si se dio con la respuesta por favor confirmalo
  #10 (permalink)  
Antiguo 25/05/2013, 12:03
Avatar de fhederico  
Fecha de Ingreso: agosto-2009
Mensajes: 247
Antigüedad: 14 años, 8 meses
Puntos: 23
Respuesta: error 500 en symfony

Te dejo mi .htaccess por si te sirve


Código:
<IfModule mod_rewrite.c>
    RewriteEngine On

    #<IfModule mod_vhost_alias.c>
    #    RewriteBase /
    #</IfModule>

    RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app_dev.php [QSA,L]
</IfModule>
Por lo menos yo, no toque el "httpd.conf".

Saludos

Etiquetas: 500
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 22:32.