Can you propose a fix? I can write the patch if you can provide us with a proposal.
Massimo On Mar 3, 7:36 pm, Graham Dumpleton <graham.dumple...@gmail.com> wrote: > On Mar 4, 4:28 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > problem is the error appear to be in mod_python, not web2py. > > Not an issue with mod_python. > > Web2Py is looking for SCRIPT_URL, this isn't put into > req.subprocess_env by Apache core modules or mod_python under normal > conditions. > > The only time that a variable by the name of SCRIPT_URL is placed in > req.subprocess_env is as a side effect of certain operations of > mod_rewrite. > > So, if mod_rewrite isn't used at all, or rewrite rules aren't coming > into play, it will not be present. > > The web2py package should be more tolerant of this and be able to cope > with it not being present. So, it is arguably a web2py issue. > > Graham > > > On Mar 3, 11:22 am, fadehelix <fadehe...@gmail.com> wrote: > > > > Hi, > > > > I have the same problem as @IRV. I can't use mod_wsgi because on my > > > shared hosting i haven't own apache configuration. > > > > regards > > > > On 19 Sty, 14:44, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > > > I will take a look but I stongly suggest you use mod_wsgi instead of > > > > mod_python. > > > > > On Jan 19, 4:57 am, IRV <irving.ho...@googlemail.com> wrote: > > > > > > Hello, > > > > > > I am newish to python and new to both web2py and deploying code on the > > > > > web so I apologize in advance if this is a very basic issue that is > > > > > solved in the documentation but I can't seem to find a solution. > > > > > > I followed the instructions from section 11.8 in the web2py book (i.e. > > > > > the manual athttp://www.web2py.com/examples/default/docs), "Apache > > > > > and mod_python in a shared hosting environment". The web2py app is > > > > > within the public_html while 'Contents' is within a folder in > > > > > public_html. I have created the two files as specified but when trying > > > > > to view the /Contents/Resources/ folder in my browser (or any > > > > > application within) I get a key error (shown below). I was wondering > > > > > if you could shed some light on the problem and how I should go about > > > > > solving it. > > > > > > It seems that modpythonhandler.py is trying to parse this path that we > > > > > send in and make sense of what controller/view to call and it's not > > > > > able to figure it out properly based on the given url so that script > > > > > could be making assumptions about where to find files that are > > > > > incorrect. However, when i've tinkered with this and tried to drop in > > > > > explicit URLs that make sense to me in the context it generates a > > > > > similar Key Error. > > > > > > ########################################################################### > > > > > ## > > > > > > Phase: 'PythonHandler' > > > > > Handler: 'web2py_modpython' > > > > > > Traceback (most recent call last): > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > importer.py", line 1537, in HandlerDispatch > > > > > default=default_handler, arg=req, silent=hlist.silent) > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > importer.py", line 1229, in _process_target > > > > > result = _execute_target(config, req, object, arg) > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > importer.py", line 1128, in _execute_target > > > > > result = object(arg) > > > > > > File "/home/black/public_html/irv/Contents/Resources/ > > > > > web2py_modpython.py", line 5, in handler > > > > > req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] > > > > > > KeyError: 'SCRIPT_URL' > > > > > > ########################################################################### > > > > > ## > > > > > > Many thanks for any help you can provide and please let me know if > > > > > there is somewhere more appropriate to make this query and i'll move > > > > > it there. > > > > > > Regards, > > > > > > Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.