You are not logged in.

#1 2006-01-28 04:50:16

fluke
Member
From: Shaoguan Univ., PRC
Registered: 2005-08-12
Posts: 241
Website

can't import _apache(mod_python.apache), mod_python problem

I'm using mod_python + quixote + apache

When I visite my page which using mod_python handler, got a 500 error.

It's said cant import mod_python.apache in the err_log of apache.

I start python interpreter, and from mod_python import apache.

It cant find the module.

Someone said that I should get my PYTHONHOME set correct.
But I don't know how should I do after tried some paths.

And more, I config my python_handler using a virtual location in httpd.conf.

Like this:
    <LocationMatch "^/qdemo(/|$)">
        SetHandler python-program
        PythonHandler quixote.server.mod_python_handler
        PythonOption quixote-publisher-factory quixote.demo.create_publisher
        PythonInterpreter quixote.demo
        PythonDebug On
    </LocationMatch>

Offline

#2 2006-01-28 12:45:56

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: can't import _apache(mod_python.apache), mod_python problem

Please give us the error message and the script if possible. It makes debugging problems a lot easier.

Offline

#3 2006-01-29 10:23:06

fluke
Member
From: Shaoguan Univ., PRC
Registered: 2005-08-12
Posts: 241
Website

Re: can't import _apache(mod_python.apache), mod_python problem

make_obcallback(): could not import mod_python.apache
this is the only error in apache error log.

and the config of mod_python is
<LocationMatch "^/qdemo(/|$)">
SetHandler python-program
PythonHandler quixote.server.mod_python_handler
PythonOption quixote-publisher-factory quixote.demo.create_publisher
PythonInterpreter quixote.demo
PythonDebug On
</LocationMatch>

the scripts are default demo files of quixote(http://quixote.ca)

Offline

#4 2006-07-26 21:30:08

ubermartian
Member
From: Edinburgh
Registered: 2004-02-06
Posts: 32

Re: can't import _apache(mod_python.apache), mod_python problem

do the default scripts in the server directory work?

simple_server.py is seg faulting on me, as is the scgi server.

Offline

Board footer

Powered by FluxBB