[mod_python] Install /Testing Issues ( missing mptest module)

George Rosvally grosvally at optonline.net
Thu Mar 8 17:45:14 EST 2007


Hi,
I am new to mod_python, and am having troubles getting it to work.

I run on windows xp sp2 and have installed python 2.5 , pywin 32-210,
mod_python-3.3.1, and use xampp 1.5.5 for my apache server.


Running mytest.py results messages stating the mptest is not found.

See ">>>>> mytest.py results" for the output.

mpinfo results follow.

Any help would be appreciated.


Thanks
George

MP info yield's  the following results:

General information
Apache version	Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d
mod_autoindex_color mod_python/3.3.1 Python/2.5 PHP/5.2.0 mod_jk/1.2.15
Apache threaded MPM	Yes, maximum 250 threads / process
Apache forked MPM	No (single process MPM)
Apache server root	C:/xamp/xampp/apache
Apache document root	C:/xamp/xampp/htdocs
Apache error log	C:/xamp/xampp/apache\logs/error.log (view last 100 lines)
Python sys.version	2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32
bit (Intel)]
Python sys.path	

C:\WINDOWS\system32\python25.zip
C:\Python25\Lib
C:\Python25\DLLs
C:\Python25\Lib\lib-tk
C:\xamp\xampp\apache
C:\xamp\xampp\apache\bin
C:\Python25
C:\Python25\lib\site-packages
C:\Python25\lib\site-packages\win32
C:\Python25\lib\site-packages\win32\lib
C:\Python25\lib\site-packages\Pythonwin

Python interpreter name	localhost
mod_python.publisher available	Yes
mod_python.psp available	Yes
Request input headers
Key	Value
Host	localhost
User-Agent	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2)
Gecko/20070219 Firefox/2.0.0.2
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
Request environment
Key	Value
GATEWAY_INTERFACE	CGI/1.1
SERVER_PROTOCOL	HTTP/1.1
REQUEST_METHOD	GET
QUERY_STRING	
REQUEST_URI	/mpinfo
SCRIPT_NAME	/mpinfo
HTTP_HOST	localhost
HTTP_USER_AGENT	Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2
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
PATH
C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\CRNADM~1;C:\Program 

Files\Common Files\STOPzilla!;C:\Program Files\NTP\bin;C:\Program
Files\ImageConverter Plus;C:\Program Files\ImageConverter
Plus;C:\Program Files\QuickTime\QTSystem\
SystemRoot	C:\WINDOWS
COMSPEC	C:\WINDOWS\system32\cmd.exe
PATHEXT	.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
WINDIR	C:\WINDOWS
SERVER_SIGNATURE	
Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d
mod_autoindex_color mod_python/3.3.1 Python/2.5 PHP/5.2.0 mod_jk/1.2.15
Server at localhost Port 80
SERVER_SOFTWARE	Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d
mod_autoindex_color mod_python/3.3.1 Python/2.5 PHP/5.2.0 mod_jk/1.2.15
SERVER_NAME	localhost
SERVER_ADDR	127.0.0.1
SERVER_PORT	80
REMOTE_ADDR	127.0.0.1
DOCUMENT_ROOT	C:/xamp/xampp/htdocs
SERVER_ADMIN	admin at localhost
SCRIPT_FILENAME	C:/xamp/xampp/htdocs/mpinfo
REMOTE_PORT	4006
Request configuration
Key	Value
PythonDebug	1
Request options
Key	Value
mod_python.mutex_directory	/tmp
mod_python.mutex_locks	8
Request notes
Key	Value
python_init_ran	1
Server configuration
Key	Value
Server options
Key	Value
mod_python.mutex_directory	/tmp
mod_python.mutex_locks	8
Server configuration tree

ThreadsPerChild 250
MaxRequestsPerChild 0
Listen 80
PythonOption mod_python.mutex_directory "/tmp"
PythonOption mod_python.mutex_locks 8
ServerAdmin admin at localhost
ServerName localhost:80
DocumentRoot "C:/xamp/xampp/htdocs"

     Options FollowSymLinks
     AllowOverride None
     Order deny,allow
     Deny from all

     Options Indexes FollowSymLinks Includes ExecCGI
     AllowOverride All
     Order allow,deny
     Allow from all

     AddHandler mod_python .py
     PythonHandler mptest
     PythonDebug On
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl
index.html index.htm index.shtml index.phtml

     Order allow,deny
     Deny from all
ErrorLog logs/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
CustomLog logs/access.log common
ScriptAlias /cgi-bin/ "C:/xamp/xampp/cgi-bin/"

     AllowOverride None
     Options None
     Order allow,deny
     Allow from all
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
EnableMMAP off
EnableSendfile off
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml


         php_admin_flag safe_mode off
Alias /security "C:/xamp/xampp/security/htdocs/"


         php_admin_flag safe_mode off
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
Alias /phpmyadmin "C:/xamp/xampp/phpMyAdmin/"

     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
Alias /webalizer "C:/xamp/xampp/webalizer/"


         php_admin_flag safe_mode off
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
Alias /contrib "C:/xamp/xampp/contrib/"


         php_admin_flag safe_mode off
     AllowOverride AuthConfig
     Order allow,deny
     Allow from all
Alias /error/ "C:/xamp/xampp/apache/error/"

     AllowOverride None
     Options IncludesNoExec
     AddOutputFilter Includes html
     AddHandler type-map var
     Order allow,deny
     Allow from all
     LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
     ForceLanguagePriority Prefer Fallback
ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
ErrorDocument 410 /error/HTTP_GONE.html.var
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
IndexOptions FancyIndexing VersionSort
Alias /icons/ "C:/xamp/xampp/apache/icons/"

     Options Indexes MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
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 us-ascii.ascii .us-ascii
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  .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .arb .arabic
AddCharset ISO-8859-7  .iso8859-7  .grk .greek
AddCharset ISO-8859-8  .iso8859-8  .heb .hebrew
AddCharset ISO-8859-9  .iso8859-9  .latin5 .trk
AddCharset ISO-8859-10  .iso8859-10  .latin6
AddCharset ISO-8859-13  .iso8859-13
AddCharset ISO-8859-14  .iso8859-14  .latin8
AddCharset ISO-8859-15  .iso8859-15  .latin9
AddCharset ISO-8859-16  .iso8859-16  .latin10
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 .b5
AddCharset cn-Big5 .cn-big5
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866   .cp866
AddCharset KOI8  .koi8
AddCharset KOI8-E  .koi8-e
AddCharset KOI8-r  .koi8-r .koi8-ru
AddCharset KOI8-U  .koi8-u
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-7   .utf7
AddCharset UTF-8   .utf8
AddCharset UTF-16  .utf16
AddCharset UTF-16BE .utf16be
AddCharset UTF-16LE .utf16le
AddCharset UTF-32  .utf32
AddCharset UTF-32BE .utf32be
AddCharset UTF-32LE .utf32le
AddCharset euc-cn  .euc-cn
AddCharset euc-gb  .euc-gb
AddCharset euc-jp  .euc-jp
AddCharset euc-kr  .euc-kr
AddCharset EUC-TW  .euc-tw
AddCharset gb2312  .gb2312 .gb
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
AddCharset shift_jis   .shift_jis .sjis

     SetHandler server-status
     Order deny,allow
     Deny from all
     Allow from .example.com

     SetHandler server-info
     Order deny,allow
     Deny from all
     Allow from .example.com
DavLockDB "C:/xamp/xampp/tmp/DavLock"
Alias /webdav "C:/xamp/xampp/webdav"

     Dav On
     Order allow,deny
     Allow from all
     AuthName DAV-upload
     AuthType Basic
     AuthUserFile "C:/xamp/xampp/security/htpasswd.webdav"

         require valid-user
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/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
UseCanonicalName Off
AccessFileName .htaccess
ServerTokens Full
ServerSignature On
HostnameLookups Off
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog builtin
SSLSessionCache dbm:logs/ssl.scache
SSLSessionCacheTimeout 300
SSLMutex default

     DocumentRoot "C:/xamp/xampp/htdocs"
     ServerName localhost:443
     ServerAdmin admin at localhost
     ErrorLog logs/error.log
     CustomLog logs/access.log combined
     SSLEngine on
     SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
     SSLCertificateFile conf/ssl.crt/server.crt
     SSLCertificateKeyFile conf/ssl.key/server.key


         SSLOptions +StdEnvVars

         SSLOptions +StdEnvVars
     BrowserMatch ".*MSIE.*"                  nokeepalive
ssl-unclean-shutdown                  downgrade-1.0 force-response-1.0
     CustomLog logs/ssl_request.log                   "%t %h
%{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
JkWorkersFile "C:/xamp/xampp/tomcat/conf/workers.properties"
JkLogFile "C:/xamp/xampp/tomcat/logs/mod_jk.log"
JkLogLevel info
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkMount /*.jsp ajp13
JkMount /java/* ajp13
JkMount /jsp-examples/* ajp13
JkMount /servlets-examples/* ajp13

     SetHandler mod_python
     PythonHandler mod_python.testhandler

>>>>> mytest.py results

MOD_PYTHON ERROR

ProcessId:      3108
Interpreter:    'localhost'

ServerName:     'localhost'
DocumentRoot:   'C:/xamp/xampp/htdocs'

URI:            '/mytest.py'
Location:       None
Directory:      'C:/xamp/xampp/htdocs/'
Filename:       'C:/xamp/xampp/htdocs/mytest.py'
PathInfo:       ''

Phase:          'PythonHandler'
Handler:        'mptest'

Traceback (most recent call last):

   File "C:\Python25\Lib\site-packages\mod_python\importer.py", line
1537, in HandlerDispatch
     default=default_handler, arg=req, silent=hlist.silent)

   File "C:\Python25\Lib\site-packages\mod_python\importer.py", line
1202, in _process_target
     module = import_module(module_name, path=path)

   File "C:\Python25\Lib\site-packages\mod_python\importer.py", line
304, in import_module
     return __import__(module_name, {}, {}, ['*'])

ImportError: No module named mptest






More information about the Mod_python mailing list