FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PythonOption in .htaccess





fofoo
I'm tying run python script using this helper: http://svn.pythonpaste.org/Paste/trunk/paste/modpython.py
my .htaccess:
Code:
Options -Indexes
AddHandler python-program .py
PythonHandler wsgiref.modpython
PythonOption wsgi.application mytest::main
PythonDebug On

when i run script mytest.py i got an error:
Code:
Mod_python error: "PythonHandler wsgiref.modpython"

Traceback (most recent call last):

  File "/usr/lib/python2.2/site-packages/mod_python/apache.py", line 193, in Dispatch
    result = object(req)

  File "/home/fofoo/domains/fofoo.frih.net/public_html/cgi-bin/wsgiref/modpython.py", line 211, in handler
    if 'wsgi.startup' in options and not startup:

TypeError: iterable argument required

I think that PythonOption isn't passed to the script (request?)
because modpython.py in lines:
Code:
def handler(req):
    options = req.get_options()
.........

results in that the value of 'option' is None, but should be a dict.
It's first cgi scripts that i'm trying to run so maybe i'm doing some stupid mistakes, but i dont know how to resolve this problem.
swizzy
i dont know whether mod_python is enabled, just do a phpinfo and check in the enabled mods list
fofoo
mod_python is enabled
Related topics
htaccess Password Protection
.htaccess tutorial
CANT UPLOAD .htaccess, .htpasswd, .header, .footer
[tutor] How to protect images without htaccess using PHP
.htaccess IP Blocking
Custom error pages using .htaccess
A Question For .htaccess
.htaccess
Can you use .htaccess?
htaccess
.htaccess problem
htaccess files gone???
.htaccess i mod_rewrite
.htaccess .htpasswd
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.