import sys
sys.stdout = sys.stderr

if '/home/mysite/public_html' not in sys.path:
    sys.path.append('/home/mysite/public_html')

import os
os.environ['PYTHON_EGG_CACHE'] = '/home/mysite/python-eggs'

import atexit
import cherrypy
import cherrypy._cpwsgi
import turbogears

turbogears.update_config(configfile="/home/mysite/public_html/
prod.cfg", modulename="blockarticle.config")
turbogears.config.update({'global': {'server.webpath': '/'}})
#turbogears.config.update({'global': {'server.environment':
'production'}})
turbogears.config.update({'global': {'server.environment':
'development'}})
turbogears.config.update({'global': {'autoreload.on': False}})
turbogears.config.update({'global': {'server.log_to_screen': False}})

import blockarticle.controllers
cherrypy.root = blockarticle.controllers.Root()

def application(environ, start_response):
    environ['SCRIPT_NAME'] = ''
    return cherrypy._cpwsgi.wsgiApp(environ, start_response)

output = open('/home/mysite/public_html/log.txt', 'wt')
print >>output, cherrypy.server.state
output.close()

if cherrypy.server.state == 0:
    atexit.register(cherrypy.server.stop)
    cherrypy.server.start(init_only=True, server_class=None)


On 1月30日, 下午5時32分, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Jan 30, 7:38 pm, Victor <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
> > I encountered a problem when I am moving my TurboGears site form my
> > windows computer to a linux server.
> > My TurboGears application run withmod_wsgiand apache.
> > I setup everything, but when I browse that wsgi page.
> > Here comes the error page:
>
> > Unrecoverable error in the server.
> > Traceback (most recent call last):
> >   File "/usr/lib/python2.4/site-packages/CherryPy-2.3.0-py2.4.egg/
> > cherrypy/_cpwsgi.py", line 113, in wsgiApp
> >     request = cherrypy.server.request(clientAddr, '',
> > environ['wsgi.url_scheme'])
> >   File "/usr/lib/python2.4/site-packages/CherryPy-2.3.0-py2.4.egg/
> > cherrypy/_cpengine.py", line 177, in request
> >     raise cherrypy.NotReady("The CherryPy server could not start.")
> > NotReady: The CherryPy server could not start.
>
> > It seems that the sever state is always "starting".
>
> > Why could this happened?
> > What could be possible cause this problem?
> > And how to fix?
>
> Can you post the WSGI script file just so we can confirm that it looks
> okay?
>
> Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to