turbogears app deployment



I am trying to host a TuboGears app using Apache and mod_python on a machine running Windows XP SP2 Professional.

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.
Added LoadModule python_module modules/mod_python.so
to conf\httpd.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 Files\Apache Software Foundation\Apache2.2\htdocs"

4. Made the following changes to conf\httpd.conf
Changed AllowOverride for .htaccess to: AllowOverride All

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. Copied mpcp.py to the bookmarker directory (tried with installing it using easy_install -Z mpcp, didn't help).

7. 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. When I try to connect to http://machine/bookmarker, I get:

Mod_python error: "PythonHandler mpcp"

Traceback (most recent call last):

File "C:\Python24\Lib\site-packages\mod_python\apache.py", 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:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cpserver.py", line 72, in start
Engine.start(self)
File "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\_cpengine.py", line 91, in start
autoreload.main(self._start, freq=freq)
File "c:\python24\lib\site-packages\CherryPy-2.2.1-py2.4.egg\cherrypy\lib\autoreload.py", line 63, in main
sys.exit(restart_with_reloader())

SystemExit: 1

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



Relevant Pages

  • Re: index.php not loading HELP
    ... Can you still load http://localhost/.../index.php? ... What's in your Apache log? ... if I were installing it for the first time I'd install WAMP- it's much easier. ... Did you check your Apache 'http.conf' config file for the 'DirectoryIndex' option as mentioned before in this thread. ...
    (comp.lang.php)
  • Re: Rogue PHP file
    ... If the time that this folder got on the server doesn't make sense, they may not have installed anything themselves. ... Of course none of them will admit to installing Apache server. ... are not running a public web server on your SBS, then close port 80 to your SBS. ...
    (microsoft.public.windows.server.sbs)
  • Re: Rogue PHP file
    ... If the time that this folder got on the server doesn't make sense, ... Of course none of them will admit to installing Apache ... are not running a public web server on your SBS (and you should NOT ...
    (microsoft.public.windows.server.sbs)
  • Re: Adding Apache Modules
    ... Subject: Adding Apache Modules ... > Assuming installing a .so rather than a libtool archive. ... > yum install httpd-devel ... I'd be inclined to try rebuilding the 2.2.2 httpd SRPM from rawhide rather ...
    (Fedora)
  • Apache build and SSL problem
    ... I'm learning Linux with Fedora Core 2 and picked up a book called ... SSL support per the instructions in the book. ... When I checked the Apache error logs I only see a message about a file ... installing and I've double/triple checked my install scripts compared ...
    (Fedora)