Fastcgi läuft das hab ich mit dieser Applikation getestet.
test.fcg
Code: Alles auswählen
#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
print "Content-type: text/html\n"
print "test\n"
Im Browser bekomme ich eine "500 Internal Server Error" und in den Apache logs steht folgendes.
Ich suche jetzt schon seit gut 5h nach einer Lösung und weiß echt nicht mehr weiter.
bin für jeden Tipp dankbar.
start.fcg
Code: Alles auswählen
#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
from flup.server.fcgi import WSGIServer
from index import app
WSGIServer(app).run()
Code: Alles auswählen
#!/usr/bin/python2.5
# -*- coding: utf-8 -*-
from colubrid import ObjectApplication, execute, HttpResponse
class MyApplication(object):
charset = 'utf-8'
def index(self):
self.response = HttpResponse()
self.response['Content-Type'] = 'text/html'
self.response.write('test')
return self.response
class DispatcherApplication(ObjectApplication):
root = MyApplication
app = DispatcherApplication
if __name__ == '__main__':
execute(app)
Code: Alles auswählen
Traceback (most recent call last):
File "/home/monocult/web/start.fcg", line 6, in <module>
WSGIServer(app).run()
File "/var/lib/python-support/python2.5/flup/server/fcgi.py", line 113, in run
ret = ThreadedServer.run(self, sock)
File "/var/lib/python-support/python2.5/flup/server/threadedserver.py", line 84, in run
clientSock, addr = sock.accept()
socket.error: (22, 'Invalid argument')
[Tue May 08 14:40:31 2007] [error] [client 127.0.0.1] Premature end of script headers: start.fcg