I've get it working with the script above:

#!/usr/bin/env python
import os, sys
paths = ["/home/walter/lib/python2.4/site-packages/"]
os.environ["PYTHONPATH"] = os.pathsep.join(paths)
sys.path[0:0] = paths
sys.path.append('/home/walter/pylons_projects/quotes/')
os.chdir("/home/walter/pylons_projects/quotes")
from pkg_resources import require
require("Pylons")
require("AuthKit")
require("Elixir")
require("wsgiref")
from paste.deploy import loadapp
wsgi_app = loadapp('config:/home/walter/pylons_projects/quotes/development.ini')
import wsgiref.handlers
wsgiref.handlers.CGIHandler().run(wsgi_app)



Just changing the last 2 lines and I get it working as fastcgi! :)

[]'s
- Walter

On 6/24/07, Philip Jenvey <[EMAIL PROTECTED]> wrote:
>
>
> On Jun 24, 2007, at 3:16 PM, Walter Cruz wrote:
>
> >
> > Hi all. After a long time trying to deploy pylons with fastcgi, I
> > fallback to cgi.
> >
> > I'me getting the "Premature end of script headers". The logs are
> > above.
> >
> > Sun Jun 24 19:14:07 2007] [error] [client 189.10.116.120] Premature
> > end of script headers:
> > /home/walter/public_html/quote/novo/dispatch.cgi
> > /home/walter/lib/python2.4/site-packages/Pylons-0.9.5-py2.4.egg/
> > pylons/wsgiapp.py:254:
> > DeprecationWarning: CacheMiddleware is moving to beaker.middleware in
> > 0.8
> > /home/walter/lib/python2.4/site-packages/Pylons-0.9.5-py2.4.egg/
> > pylons/wsgiapp.py:249:
> > DeprecationWarning: SessionMiddleware is moving to beaker.middleware
> > in 0.8
> >
> > I know that the premature end is a common trouble, but can someone
> > help me?
> >
>
> Could those DeprecationWarnings be interfering with the CGI output?
> CGI just grabs the output of a program (stdout).
>
> Those warnings should be going out to stderr, but I don't know if
> your CGI is capturing stderr as well as stdout. You could certainly
> try disabling them (see the warnings module docs on filtering)
>
>
> --
> Philip Jenvey
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to