List Info

Thread: turbogears app deployment




turbogears app deployment
user name
2006-12-27 05:40:47
I am trying to host a TuboGears app using Apache and
mod_python on a
machine running Windows XP SP2 Professional. Both the
machines are on
the same network (this is a test setup).

Version info: apache_2.2.3-win32-x86-no_ssl.msi,
python-2.4.4.msi,
mod_python-3.2.10.win32-py2.4-apache2.2.exe,
mpcp-1.5.tar.gz,
turbogears-1.0b2-py2.4

=========================================================
1. Installed Apache.

2. Installed python, turbogears, mod_python, mpcp.
   Added     LoadModule python_module modules/mod_python.so
   to confhttpd.conf. The mod_python example is working.

3. In order to host a simple TG application, I am using the
bookmarker
application which is in the TurboGears book (v1 from Chap
4).
   That works when I run it locally on my machine (also a
WinXP SP2
box).
   Copied the application to "C:Program FilesApache
Software
FoundationApache2.2htdocs"

4. Made the following changes to confhttpd.conf

<Directory htdocs/bookmarker>
    AllowOverride FileInfo
</Directory>

5. Renamed start file to bookmarker_start.py. Created a file
called
.htaccess in bookmarker directory which has the following

SetHandler mod_python
PythonHandler mpcp
PythonDebug On
PythonOption cherrysetup bookmarker_start::mp_setup

6. Changed bookmarker_start.py

#turbogears.start_server(Root())    <-----------
commented this line
and added the lines below.

def mp_setup():
    pass

if __name__ == "__main__":
    cherrypy.server.start()
=========================================================

I have restarted the Apache daemon multiple times (starts up
fine).
When I try to connect to http://machine/bookmarker, I get:

Mod_python error: "PythonHandler mpcp"

Traceback (most recent call last):

  File
"C:Python24Libsite-packagesmod_pythonapache.py&quo
t;, line 299,
in HandlerDispatch
    result = object(req)

  File "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/bookmarker/mpcp.py", line
38, in handler
    setup(req, options)

  File "C:/Program Files/Apache Software
Foundation/Apache2.2/htdocs/bookmarker/mpcp.py", line
22, in setup
    cherrypy.server.start(init_only=True, server_class=None)

  File
"c:python24libsite-packagesCherryPy-2.2.1-py2.4.egg
cherrypy_cpserver.py",
line 72, in start
    Engine.start(self)

  File
"c:python24libsite-packagesCherryPy-2.2.1-py2.4.egg
cherrypy_cpengine.py",
line 91, in start
    autoreload.main(self._start, freq=freq)

  File
"c:python24libsite-packagesCherryPy-2.2.1-py2.4.egg
cherrypylibautoreload.py",
line 63, in main
    sys.exit(restart_with_reloader())

SystemExit: 1


Any idea what the problem is? Thanks for your help.


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---

Re: turbogears app deployment
user name
2007-01-21 10:46:41

On 27 déc 2006, 06:40, "VN" <vijay.n...gmail.com> wrote:

[...]

>   File
>
"c:python24libsite-packagesCherryPy-2.2.1-py2.4.egg
cherrypylibautoreload.py",
> line 63, in main
>     sys.exit(restart_with_reloader())
>
> SystemExit: 1
>
> Any idea what the problem is? Thanks for your help.

You must desactivate the autoreload from cherrypy with
something like
this:

cherrypy.config.update({'global' : {'autoreload.on' :
False}})

/florent


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/cherrypy-users?hl=en

-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )