error in

Christopher Blunck blunck at gst.com
Sun Apr 27 23:06:48 EDT 2003


Mod_Python executes your modules using restricted execution mode. 
Under restricted execution mode, a module cannot execute arbitrary
code (which your handler module qualifies as).  PyXML tries to load
encodings (usually UTF-8) when processing your xml message.  The
loading of the encodings is quantified as executing arbitrary code. 
It is promptly stopped with the message you displayed.

I'm looking into ways to either Bastion PyXML or to get mod_python to
support PyXML.  Will post more when I learn more.

-c

Vince Buonassisi <vjb at vuit.com> wrote in message news:<mailman.1050622890.4267.python-list at python.org>...
> hi,
> 
> i am getting the following error when i load my test script in my web  
> server:
> 
> Mod_python error: "PythonHandler reqhandler"
> 
> Traceback (most recent call last):
> 
>    File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line  
> 181, in Dispatch
>      module = import_module(module_name, _req)
> 
>    File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line  
> 335, in import_module
>      module = imp.load_module(mname, f, p, d)
> 
>    File "/usr/local/apache/htdocs/reqhandler.py", line 9, in ?
>      from xml.dom.ext.reader.Sax2 import FromXmlStream, FromXml
> 
>    File  
> "/usr/lib/python2.2/site-packages/_xmlplus/dom/ext/reader/__init__.py",  
> line 21, in ?
>      encoder = codecs.lookup("utf-8")[0] # encode,decode,reader,writer
> 
>    File  
> "/usr/src/build/143041-i386/install/usr/lib/python2.2/encodings/ 
> __init__.py", line 51, in search_function
> 
> RuntimeError: cannot unmarshal code objects in restricted execution mode
> 
> the script i am running is very simple.  i just send a text message to  
> the browser.  i am using the following versions of software:
> 
> apache 1.3.26
> python 2.2.1
> mod python 2.7.8
> PyXML 0.7.1
> linux redhat 8
> 
> any help would be appreciated.
> 
> thanks
> 
> vince
> --




More information about the Python-list mailing list