[mod_python] Can't get it to interpret

Jim Gallacher jpg at jgassociates.ca
Mon Oct 2 17:07:44 EDT 2006


Paul J. Pathiakis wrote:
> ** Graham,
> 
> 
> If the PythonHeaderParserHandler wasn't there, I would say that the
> PythonPath directive isn't required as mod_python.publisher doesn't
> require it to be set as described.
> 
> The question is, what is 'nav.web' and what does the handler in it
> do? Most people wouldn't have a need to be defining a handler for
> the PythonHeaderParserHandler phase. What it does will dictate
> whether or not PythonPath needs to be set as indicated or whether
> the comment about what to do derives from a misunderstanding as to
> how mod_python works.

FYI Graham, the authentication is performed in by the 
PythonHeaderParserHandler handler.

> Graham
> 
> ** Well, nav.web is a directory /usr/local/nav/lib/python/.  NAV is a directory in the director.  Web is the directory underneath it.  I believe it's supposed to be the web interface to the NAV software.  There's about 20 files in there.  I'm trying to figure out if there's an easier way to interface.  Personally, I was looking at my httpd.conf file and wanted to just alias the /usr/local/nav/webroot directory.  (Someone else mailed me with the same idea)  
> 
> Now that I added to the path, I have now encountered this (which seems to point that there is a login attempt into a database, tell me, what information can I send the list to further my cause?):
> 
> Mod_python error: "PythonHeaderParserHandler nav.web"
> 
> Traceback (most recent call last):
> 
>   File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 287, in HandlerDispatch
>     log=debug)
> 
>   File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py", line 464, in import_module
>     module = imp.load_module(mname, f, p, d)
> 
>   File "/usr/local/nav/lib/python/./nav/web/__init__.py", line 28, in ?
>     import nav.web.auth
> 
>   File "/usr/local/nav/lib/python/./nav/web/auth.py", line 31, in ?
>     from nav import db
> 
>   File "/usr/local/nav/lib/python/./nav/db/__init__.py", line 103, in ?
>     setDefaultConnection(getConnection('default'));
> 
>   File "/usr/local/nav/lib/python/./nav/db/__init__.py", line 86, in getConnection
>     connection = psycopg.connect('host=%s dbname=%s user=%s password=%s' %
> 
> OperationalError: fe_sendauth: no password supplied
> 
> Thanks,

I'd say you are pretty close to getting this puppy working. My guess is 
that there is some other spot in the NAV where host, dbname, user and 
password are configured. Once you've found that you should be off to the 
races.

Jim




More information about the Mod_python mailing list