Hi,

I know its not recommended to run web2py as CGI script but its the only 
thing my hosting environment allows.

But I cannot get it to work. All I get is :

*ERROR:web2py:Traceback (most recent call last):*
*  File "XXX/XXX/www/web2py/cgi-bin/gluon/main.py", line 347, in wsgibase*
*    if not environ['PATH_INFO'] and environ['REQUEST_URI']:*
*KeyError: 'PATH_INFO'*
*
*
*Status: 500 INTERNAL SERVER ERROR*
*Content-Type: text/html; charset=UTF-8*
*web2py_error: ticket unrecoverable*
*Content-Length: 719*

My cgihandler.py looks like this:

*#!/usr/bin/env python*
*# -*- coding: utf-8 -*-*
*
*
*import os*
*import sys*
*import wsgiref.handlers*
*
*
*path = os.path.dirname(os.path.abspath(__file__))*
*os.chdir(path)*
*
*
*if path in sys.path:*
*    sys.path.remove(path)*
*sys.path.insert(0, path)*
*
*
*import gluon.main*
*wsgiref.handlers.CGIHandler().run(gluon.main.wsgibase)
*

What am I doing wrong?

Regards
Hytters

Reply via email to