correr archivos python en servidor

antonio a.porrua en gmail.com
Lun Mayo 5 10:03:12 CEST 2008


A mi me suena a que el script da un error, pero el código que has
enviado es correcto...

Haz lo siguiente si no has hecho ya. 

1. Comprueba el log del servidor.
2. Comprueba los permisos de ejecución del script.
3. Comprueba que la ruta a python es correcta.
4. Comprueba que el script no da error.
5. Haz un exorcismo al servidor xDD

El dom, 04-05-2008 a las 21:28 -0700, punchik punchik escribió:
> el archivo python si envia la salida con formato html.. aca esta el codigo:
> 
>    
>    
>   #!/usr/bin/python
> import cgitb
> cgitb.enable()
>   print "Content-type: text/html"
> print
>   import time
>   print "<HTML>"
> print "<HEAD>"
> print "<TITLE>Penzilla.net:  What is the Time? Example</TITLE>"
> print "</HEAD>"
> print "<BODY>"
> print "<H2>Penzilla.net What is the Time?(wittime.py) Example:</h2>"
> print "<P>Penzilla thinks that it is: %s</P>" % time.ctime()
> print "</BODY>"
> print "</HTML>"
> 
> Marco Antonio Islas Cruz <markuz en islascruz.org> wrote:
>   Los scripts en Python, asi como cualquier otro CGI deben enviar la
> salida con formato HTML, incluyendo los headers. PHP lo hace, solo que
> no te das cuenta de que lo hace.
> 
> Investiga sobre los headers del protocolo http.
> 
> On Sun, 2008-05-04 at 21:12 -0700, punchik punchik wrote:
> > hola, soy novato en python, he estado tratando de correr varios scripts en mi servidor web pero no me funciona, en todos me sale el mismo error, alguien tiene idea de porque sucede esto? mi servidor es dreamhost y si soporta scripts de python, no entiendo porque no lo reconoce, tendre que activar algo ? alguna idea?.. el error es el siguiente:
> > 
> > gracias
> > 
> > 
> > 500 internal server error
> > Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
> > Please contact the server administrator, webmaster en metalex.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.
> > More information about this error may be available in the server error log.
> > Additionally, a 404 Not Found error was encountered 
> > 
> > 
> > 
> > 
> > ---------------------------------
> > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
> > _______________________________________________
> > Lista de correo Python-es 
> > http://listas.aditel.org/listinfo/python-es
> > FAQ: http://listas.aditel.org/faqpyes

------------ próxima parte ------------
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes


Más información sobre la lista de distribución Python-es