[mod_python] No module named _apache from inside apache

Gregory (Grisha) Trubetskoy grisha at modpython.org
Mon Sep 20 22:51:04 EDT 2004


John - I don't understand your config at all, but your problem seems to be 
that HRAStart is executed as a CGI program (rather than by mod_python). 
You should probably re-read the docs, especially the tutorial part :-)

Grisha


On Sun, 19 Sep 2004, John Raines wrote:

> ImportError: No module named _apache


[SNIP]

> conf/httpd.conf:
> LoadModule python_module modules/mod_python.so
> <Directory />
>    Options FollowSymLinks
>    AllowOverride None
> </Directory>
> <Directory "/usr/local/apache2/htdocs/HTML">
>  AddHandler mod_python .py
>  PythonHandler HRAStart
>  PythonDebug On
>  PythonAutoReload On
>  PythonPath "sys.path 
> +['/sw/lib/python2.3/site-packages/mod_python','/usr/local/mod_python 
> -3.1.3/lib/python']"
> #
>    Options Indexes FollowSymLinks
>    AllowOverride FileInfo
>    Order allow,deny
>    Allow from all
>
> </Directory>
> <Directory /usr/local/apache2/cgi-bin>
>    Options ExecCGI
> </Directory>
> #JRR
> <Directory /sw/lib/python2.3/site-packages>
>    Options ExecCGI
> </Directory>
> #JRR
>
>
> John-Raines-Computer:/usr/local/apache2 jrraines$ pydoc sys.path
> Help on list in sys:
>
> sys.path = ['.', '/sw/lib/python23.zip', '/sw/lib/python2.3', 
> '/sw/lib/python2.3/plat-darwin', '/sw/lib/python2.3/plat-mac', 
> '/sw/lib/python2.3/pla
> t-mac/lib-scriptpackages', '/sw/lib/python2.3/lib-tk', 
> '/sw/lib/python2.3/lib-dynload', '/sw/lib/python2.3/site-packages']
>


More information about the Mod_python mailing list