[mod_python] RE: Mod_python Digest, Vol 48, Issue 10

Posey, Jake E Jake.E.Posey at boeing.com
Thu Mar 8 18:30:14 EST 2007


I've asked my users to do that but unfortunately they say they can't
upgrade.  If we can't get this resolved then we would have to rebuild
the box and install the 32bit OS, which is what we have running on the
other boxes.

Anything would help.

Thanks,

Jake

-----Original Message-----
From: mod_python-request at modpython.org
[mailto:mod_python-request at modpython.org] 
Sent: Thursday, March 08, 2007 2:59 PM
To: mod_python at modpython.org
Subject: Mod_python Digest, Vol 48, Issue 10

Send Mod_python mailing list submissions to
	mod_python at modpython.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://mailman.modpython.org/mailman/listinfo/mod_python
or, via email, send a message with subject or body 'help' to
	mod_python-request at modpython.org

You can reach the person managing the list at
	mod_python-owner at modpython.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mod_python digest..."


Today's Topics:

   1. Re: Compiling mod_python on 64bit RHEL 4 (Graham Dumpleton)
   2. Re: mod_python and .pyo files (Graham Dumpleton)
   3. Re: publisher - variable processing (Graham Dumpleton)
   4. Install /Testing Issues ( missing mptest module) (George Rosvally)
   5. Re: Install /Testing Issues ( missing mptest module)
      (Graham Dumpleton)


----------------------------------------------------------------------

Message: 1
Date: Fri, 9 Mar 2007 08:04:11 +1100
From: "Graham Dumpleton" <graham.dumpleton at gmail.com>
Subject: Re: [mod_python] Compiling mod_python on 64bit RHEL 4
To: "Posey, Jake E" <Jake.E.Posey at boeing.com>
Cc: mod_python at modpython.org
Message-ID:
	<88e286470703081304p19ae82d5v7c63203d7ee4beac at mail.gmail.com>
Content-Type: text/plain; charset=WINDOWS-1252; format=flowed

On 09/03/07, Posey, Jake E <Jake.E.Posey at boeing.com> wrote:
> I have a couple of issues.
>
> One is I have Apache 1.3.31 and Python 2.3.4 and I'm trying to compile
> mod_python 2.7.10 on 64bit RHEL 4 but after running configure
> -with-apxs=/ots/apache_1.3.31/bin/apxs the make dso fails
> with the following error.
>
> /usr/bin/ld: mod_python.o: relocation R_X86_64_32 against `a local
symbol'
> can not be used when making a shared object; recompile with -fPIC
>
> mod_python.o: could not read symbols: Bad value
>
> collect2: ld returned 1 exit status
>
> apxs:Break: Command failed with rc=1
>
> make[1]: *** [mod_python.so] Error 1
>
> make[1]: Leaving directory `/tmp/mod_python-2.7.10/src'
>
> make: *** [do_dso] Error 2
>
>
>
> I've tried several version of  apache, python, and mod_python and I
get the
> same error.

Have you tried a current version of Apache and mod_python and not some
really old versions? Ie., something like Apache 2.2.4 and mod_python
3.3.1.

Trying to debug how to compile what is a very old version of
mod_python against a 64 bit platform isn't something that you will
probably find anyone willing to help with. By using a newer version
means we also know it isn't something that may have been resolved in a
newer version.

Graham



------------------------------

Message: 2
Date: Fri, 9 Mar 2007 08:05:04 +1100
From: "Graham Dumpleton" <graham.dumpleton at gmail.com>
Subject: Re: [mod_python] mod_python and .pyo files
To: "Tobin Cataldo" <tcataldo at bham.lib.al.us>
Cc: mod_python at modpython.org
Message-ID:
	<88e286470703081305w42c8c768y3fe6e50565e2b23b at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 09/03/07, Tobin Cataldo <tcataldo at bham.lib.al.us> wrote:
> Greetings,
>
> I would like to ship only .pyo files to a website and use those with
> mod_python. I have seen this question in the archives but haven't seen
a
> clear answer.
>
> I believe the Python Interpreter will choose a .pyc or .pyo file if
> available, but I want to only have the .pyo files in my target
directory.
>
> Apache conf:
> DirectoryIndex index.pyo index.py ...
> ...
> AddHander mod_python .pyo
> ...
> SetHandler mod_python
>
> This Apache configuration still requires .py in the target directory
or
> the page can't be found.
>
> I am applying mod_python against a directory which Graham says will
> translate to a request against index.py
>
(http://www.dscpl.com.au/wiki/ModPython/Articles/SetHandlerVersusAddHand
ler).
>
> How do I overwrite this behavior? I suppose I could do it via Location
> directives, but how to do this with DirectoryIndex and the Directory
> directives?

For code files which are managed by the mod_python module importer you
cannot do that as it doesn't use .pyc or .pyo files nor generate them.

This has been the case for mod_python.publisher since mod_python 3.2.7
and for all module imports managed by mod_python since 3.3.1.

Note that where a module import cannot be done by mod_python and it
defers to the standard Python module importer, the standard Python
module importer will still make use of .pyc/.pyo files if they exist,
although, for .pyo files you would need to have specified the
directive:

 PythonOptimize On

Graham


------------------------------

Message: 3
Date: Fri, 9 Mar 2007 08:12:06 +1100
From: "Graham Dumpleton" <graham.dumpleton at gmail.com>
Subject: Re: [mod_python] publisher - variable processing
To: "Colin Bean" <ccbean at gmail.com>
Cc: mod_python at modpython.org
Message-ID:
	<88e286470703081312p4e2de421ic4eb3e6b82b1dd01 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 09/03/07, Colin Bean <ccbean at gmail.com> wrote:
> Have you considered using mod_rewrite?  If you don't mind using an
> outside module, you'd be able to use "pretty" urls and not have to
> change your publisher code.
>
> Colin
>
> On 3/8/07, Peter Sanchez <petersanchez at gmail.com> wrote:
> > Is there a way to process data passed in the URL without using the
> > "normal" CGI method using publisher? ie,
> >
> > www.domain.com/script?var1=foo&var2=blah - This I can use req.form
> > for the data. Say I want to use the following:
> >
> > www.domain.com/script/foo/blah
> >
> > I don't mind parsing the data myself, but how can I get the string
"/
> > foo/blah" ?
> >
> > I am sure its possible creating a different handler, but is it
> > possible to do so using .publisher?

I'd also suggest mod_rewrite as one way of doing it, but there is also
a way of doing it in mod_python.publisher using a wrapper class for a
method. See:

  http://www.modpython.org/pipermail/mod_python/2005-March/017560.html

The concept could probably be extended to handle form parameters
properly and also to be able to be applied using a decorator.

Graham


------------------------------

Message: 4
Date: Thu, 08 Mar 2007 17:45:14 -0500
From: George Rosvally <grosvally at optonline.net>
Subject: [mod_python] Install /Testing Issues ( missing mptest module)
To: mod_python at modpython.org
Message-ID: <45F091FA.7080001 at optonline.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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/plai
n;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/plai
n;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






------------------------------

Message: 5
Date: Fri, 9 Mar 2007 09:58:40 +1100
From: "Graham Dumpleton" <graham.dumpleton at gmail.com>
Subject: Re: [mod_python] Install /Testing Issues ( missing mptest
	module)
To: "George Rosvally" <grosvally at optonline.net>
Cc: mod_python at modpython.org
Message-ID:
	<88e286470703081458t503c4f4cw37177b148be98b81 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 09/03/07, George Rosvally <grosvally at optonline.net> wrote:
> 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.

Putting PythonHandler at the root of your web server like that is
probably not a good idea. I would suggest you try following guidelines
for mptest example at:

 
http://www.dscpl.com.au/wiki/ModPython/Articles/GettingModPythonWorking

This might help you to understand how to set things up better. Take
note that the user that Apache runs as must have permissions to be
able to read your code files.

Also a good idea to read:

 
http://www.dscpl.com.au/wiki/ModPython/Articles/SetHandlerVersusAddHandl
er

if you are not too familiar with Apache.

Graham


------------------------------

_______________________________________________
Mod_python mailing list
Mod_python at modpython.org
http://mailman.modpython.org/mailman/listinfo/mod_python


End of Mod_python Digest, Vol 48, Issue 10
******************************************



More information about the Mod_python mailing list