[mod_python] server misconfig error

Graham Dumpleton grahamd at dscpl.com.au
Wed Aug 24 05:41:43 EDT 2005


It looks like you are actually using a CGI script and aren't actually
using mod_python at all. The two AddHandler directives for the .py
extension are going to be in conflict. If you comment out

   AddHandler mod_python .py
   PythonDebug On

does your code still work on the box where it is working on so far?
This will confirm that mod_python isn't necessary for what you are
doing.

In other words, you don't need mod_python if all you want is a CGI
script that can be written using Python.

For an example of what a basic mod_python handler is actually about,
you might follow through the example in:

   http://www.dscpl.com.au/articles/modpython-001.html

Graham

On 24/08/2005, at 7:26 PM, Mike Dewhirst wrote:

> I have a problem which defeats me and would appreciate any assistance.
>
>  I'm just starting out with mod_python. I have two Apache servers on 
> two WinXP machines. A desktop and a laptop. They are "identical" and 
> one works while the other doesn't. Laptop Apache and mod_python works; 
> the desktop don't.
>
>  I have checked for identical directory structures and installations 
> of relevant software.
>
>  I'm using the same httpd.conf file for each. There must be something 
> I'm missing.
>
>  Apache 2.0.50 and mod_python 3.1.3 and python 2.3.4 on both machines 
> ...
>
>  The test I used to get started is ...
>
>  1. Straight HTML form (collect.html) which collects a few data items 
> like this ...
>
>  <form name="frmCollect" method="post" action="/cgi-bin/collect.py"> 
> etc
>
>  2. collect.py just builds a page from the collected data and prints 
> it back to the browser to prove it all works. Nothing tricky and as I 
> said above, my first attempt worked. The laptop's Apache server setup 
> didn't miss a beat. It still works.
>
>  3. Time comes to replicate the setup using the desktop as a server 
> and I promise I have taken two hours to do this - the browser on the 
> laptop happily brings up desktop's collect.html but desktop's Apache 
> barfs with the following ...
>
>  [Wed Aug 24 18:46:03 2005] [error] [client 192.168.0.38] (OS 3)The 
> system cannot find the path specified.  : couldn't create child 
> process: 720003: collect.py, referer: http://192.168.0.22/collect.html
>  [Wed Aug 24 18:46:03 2005] [error] [client 192.168.0.38] (OS 3)The 
> system cannot find the path specified.  : couldn't spawn child 
> process: C:/apache/Apache2/htdocs/test/py/collect.py, referer: 
> http://192.168.0.22/collect.html
>
>  laptop is 192.168.0.38 and I lied about identical httpd.conf files - 
> I edited the server name on the desktop to reflect reality ie., 
> 192.168.0.22
>
>  Here are some relevant portions of http.conf which are identical in 
> both machines ...
>  #
>  DocumentRoot "C:/apache/Apache2/htdocs/test"
>  #
>  <Directory c:/apache/Apache2/htdocs/test/py>
>      Options ExecCGI
>      AllowOverride All
>      AddHandler mod_python .py
>      AddHandler cgi-script .py # PythonHandler *
>      PythonDebug On
>  </Directory>
>  #
>  ScriptAlias /cgi-bin/ "C:/apache/Apache2/htdocs/test/py/"
>  <Directory "C:/apache/Apache2/htdocs/test/py">
>      AllowOverride None
>      Options None
>      Order allow,deny
>      Allow from all
>  </Directory>
>  #
>
>  Thanx
>
>  Mike
>
>  _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python




More information about the Mod_python mailing list