Python - Problemas ejecucion apache python

 
Vista:

Problemas ejecucion apache python

Publicado por Papillork (2 intervenciones) el 18/01/2007 16:03:05
Hola,
tengo un script prueba.cgi

#!/usr/bin/python
import os, time, sys
print "Content-type: text/html\r\n"
print time.gmtime()
print os.system('cat /etc/network/interfaces')

la ejecucion de este archivo desde la shell funciona ok. (python prueba.cgi)

El problema ocurre en apache cuando lo ejecuto, tengo problemas con la
ultima linea, especificamente el comando "os.system('cat ...). Si comento
la linea todo funciona bien.

el archivo log me muestra lo siguiente.
[Thu Jan 18 11:33:52 2007] [error] [client 127.0.0.1] malformed header
from script. Bad header=# This file describes the netw:
/usr/lib/cgi-bin/prueba.cgi
[Thu Jan 18 11:33:52 2007] [error] [client 127.0.0.1] File does not exist:
/var/www/favicon.ico

si me pueden ayudar.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder