[mod_python] Can't get it to interpret

Paul J. Pathiakis ppathiakis at eagleaccess.com
Thu Sep 28 08:41:03 EDT 2006


Hi,

as I discover more about this....

there's a .htaccess file in directory which contains this:

SetHandler python-program
PythonHander mod_python.publisher
PythonDebug On

PythonHeaderParserHandler nav.web

# In a running installation, PythonPath should be set her, adding all the 
# subdirectories containing Python modules.

PythonPath "sys.path+['/usr/local/nav/apache/webroot/.']"

Could someone please explain what the above means?  I haven't worked on web and/or mod_python in quite a while.  I could really use the help.  

Thank you,

Paul





-----Original Message-----
From: Paul J. Pathiakis
Sent: Wed 9/27/2006 2:27 PM
To: Paul J. Pathiakis; mod_python at modpython.org
Subject: RE: [mod_python] Can't get it to interpret
 
Interesting... I got it to work but it was due to the AllowOverrides allowing FileInfo only.... so...
Now I'm trying to get this to follow the link to nav (NAV) that is in the Document Root that goes to Nav's webroot (on FreeBSD - /usr/local/nav/apache/webroot)  After moving NAV's sudirectory to be under the document root, everything goes fine until I enter the python files:

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 461, in import_module
    f, p, d = imp.find_module(parts[i], path)

ImportError: No module named nav


Thanks again,

Paul


-----Original Message-----
From: mod_python-bounces at modpython.org on behalf of Paul J. Pathiakis
Sent: Wed 9/27/2006 1:56 PM
To: mod_python at modpython.org
Subject: [mod_python] Can't get it to interpret
 
Hi,

I've been trying, according to the manual, to get things to work on the mptest.py example.  It doesn't go.  However, I did move onto the trouble shooting and I hope someone can help.  My problem is that the information comes up as just plain text.  I have tried AllowOverrides all and a few other things but this is not my forte'.  I'm trying to get NAV up and running for the network (I already have nagios, orca and several other tools but NAV with cricket would be a boon.)  However, I can't get mod_python to work.  I believe I had it working at COB Friday, but come Monday... well...

Give me what you can.  I can usually ramp fairly quickly.  I've been on this for 3 days and I'm starting to dislike it. :-(

Thank you all!

Paul


General information
Apache version	Apache/2.0.59 (FreeBSD) PHP/5.1.6 mod_python/3.2.10 Python/2.4.3
Apache threaded MPM	No (single thread MPM)
Apache forked MPM	Yes, maximum 256 processes
Apache server root	/usr/local
Apache document root	/usr/local/www/data
Apache error log	/var/log/httpd-error.log (view last 100 lines)
Python sys.version	2.4.3 (#1, Aug 9 2006, 09:05:59) [GCC 3.4.4 [FreeBSD] 20050518]
Python sys.path	

/mpinfo/
/usr/local/lib/python24.zip
/usr/local/lib/python2.4
/usr/local/lib/python2.4/plat-freebsd6
/usr/local/lib/python2.4/lib-tk
/usr/local/lib/python2.4/lib-dynload
/usr/local/lib/python2.4/site-packages

Python interpreter name	monitor.foo.com
mod_python.publisher available	Yes
mod_python.psp available	Yes
Request input headers
Key	Value
Host	10.170.1.241
User-Agent	Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.7) Gecko/20060927 Firefox/1.5.0.7
Accept	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language	en-us,en;q=0.5
Accept-Encoding	gzip,deflate
Accept-Charset	ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive	300
Connection	keep-alive
Cache-Control	max-age=0
Request environment
Key	Value
UNIQUE_ID	0xEf2n8AAAEAACmwBDcAAAAA
GATEWAY_INTERFACE	CGI/1.1
SERVER_PROTOCOL	HTTP/1.1
REQUEST_METHOD	GET
QUERY_STRING	
REQUEST_URI	/mpinfo
SCRIPT_NAME	/mpinfo
HTTP_HOST	10.10.10.10
HTTP_USER_AGENT	Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.0.7) Gecko/20060927 Firefox/1.5.0.7
HTTP_ACCEPT	text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_LANGUAGE	en-us,en;q=0.5
HTTP_ACCEPT_ENCODING	gzip,deflate
HTTP_ACCEPT_CHARSET	ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_KEEP_ALIVE	300
HTTP_CONNECTION	keep-alive
HTTP_CACHE_CONTROL	max-age=0
PATH	/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
SERVER_SIGNATURE	
Apache/2.0.59 (FreeBSD) PHP/5.1.6 mod_python/3.2.10 Python/2.4.3 Server at 10.170.1.241 Port 80
SERVER_SOFTWARE	Apache/2.0.59 (FreeBSD) PHP/5.1.6 mod_python/3.2.10 Python/2.4.3
SERVER_NAME	10.10.10.10
SERVER_ADDR	10.10.10.10
SERVER_PORT	80
REMOTE_ADDR	10.100.11.47
DOCUMENT_ROOT	/usr/local/www/data
SERVER_ADMIN	root at monitor.foo.com
SCRIPT_FILENAME	/usr/local/www/data/mpinfo
REMOTE_PORT	55673
Request configuration
Key	Value
Request options
Key	Value
Request notes
Key	Value
python_init_ran	1
Server configuration
Key	Value
Server options
Key	Value
Server configuration tree

PidFile /var/run/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
Listen 80
User www
Group www
ServerAdmin root at monitor.foo.com
ServerName monitor.foo.com:80
UseCanonicalName Off
DocumentRoot "/usr/local/www/data"

    AllowOverride None
    Order Deny,Allow
    Deny from all

    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
UserDir public_html
UserDir disabled root toor daemon operator bin tty kmem games news man sshd bind proxy _pflogd _dhcp uucp pop www nobody mailnull smmsp

    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    
        Order allow,deny
        Allow from all
    
        Order deny,allow
        Deny from all
DirectoryIndex index.html index.html.var
AccessFileName .htaccess

    Order allow,deny
    Deny from all
TypesConfig etc/apache2/mime.types
DefaultType text/plain
MIMEMagicFile etc/apache2/magic
HostnameLookups Off
ErrorLog /var/log/httpd-error.log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /var/log/httpd-access.log combined
ServerTokens Full
ServerSignature On
Alias /icons/ "/usr/local/www/icons/"

    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/local/share/doc/apache2$1"

    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
    
        SetHandler type-map
    SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
    RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
ScriptAlias /nagios/cgi-bin/ /usr/local/www/nagios/cgi-bin/

    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/etc/nagios/htpasswd.users
    Require valid-user
Alias /nagios/  "/usr/local/www/nagios/"

    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/etc/nagios/htpasswd.users
    Require valid-user

    Order allow,deny
    Allow from all

    Options ExecCGI
ScriptAlias /nessus/cgi-bin/ /usr/local/www/nessus/cgi-bin/
Alias /nessus/  /usr/local/www/nessus/

    Options Indexes FollowSymLinks ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
Alias /cricket/ /usr/local/cricket/cricket/doc/

    SetHandler mod_python
    PythonHandler mod_python.testhandler
ScriptAlias /nav/ /usr/local/nav/apache/webroot/

    Options Indexes FollowSymLinks ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
ScriptAlias /cgi-bin/ "/usr/local/www/cgi-bin/"

    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
IndexOptions FancyIndexing VersionSort
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler type-map var
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20060928/2c5e02fb/attachment-0001.html


More information about the Mod_python mailing list