Comments (10)
Could you paste the relevant part of your Apache config?
from mod_python.
The Apache config for roundup part is as following, and I copy the code from the roundup website, and change the directory according to my system. I use "//" instead of "#" for comments, otherwise, the format is weried.
#################################################
// Roundup Issue tracker
###############begin###########################
//enable Python optimizations (like 'python -O')
PythonOptimize On
//let apache handle static files from 'html' directories
AliasMatch /roundup/(.+)/@@file/(.) /var/www/html/roundup/$1/html/$2
//everything else is handled by roundup web UI
AliasMatch /roundup/([^/]+)/(?!@@file/)(.) /var/www/html/roundup/$1/dummy.py/$2
//roundup requires a slash after tracker name - add it if missing
//RedirectMatch permanent ^/roundup/([^/]+)$ /roundup/$1/
//common settings for all roundup trackers
<Directory /var/www/html/roundup/issues>
Order allow,deny
Allow from all
AllowOverride None
Options None
AddHandler python-program .py
PythonHandler roundup.cgi.apache
//uncomment the following line to see tracebacks in the browser
//(note that some tracebacks will be displayed anyway)
PythonDebug On
//roundup tracker homes
<Directory /var/www/html/roundup/issues>
PythonOption TrackerHome /var/www/html/roundup/issues
###############end###########################
The tree command displays the roundup directory structure.
roundup/
└── issues
├── config.ini
├── config.ini~
├── db
│ ├── backend_name
...........................
Thanks for your help.
from mod_python.
I would say this is a bug in roundup, line 122 in this http://sourceforge.net/p/roundup/code/ci/default/tree/roundup/cgi/apache.py should be:
req.add_cgi_vars()
from mod_python.
Thanks grisha.
This only partially solved the problem. After I changed the line reg.add_common_vars() to req.add_cgi_vars(), I can access the website http://119.78.238.228/roundup/issues/. However, the same error occured again after I clicked the links at random on the site http://119.78.238.228/roundup/issues/. Then, I restart httpd service again. The website is normal again for only a short time. again and again...
I changed the roundup 1.4.20 to 1.5.0, but the problem is still there. Your solution cures the problem for a short while.
very weried!
The error is a little different from the previous one. Here it is.
Mod_python error: "PythonHandler roundup.cgi.apache"
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/mod_python/apache.py", line 398, in HandlerDispatch
result = obj(req)
File "/usr/lib/python2.6/site-packages/roundup/cgi/apache.py", line 135, in handler
_client.main()
File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 367, in main
self.inner_main()
File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 567, in inner_main
self.write_html(html)
File "/usr/lib/python2.6/site-packages/roundup/cgi/client.py", line 1274, in write_html
if self.env['REQUEST_METHOD'] == 'HEAD':
KeyError: 'REQUEST_METHOD'
from mod_python.
Are you sure you simply didn't forget to make the same change when you upgraded to 1.5.0?
from mod_python.
Absolutely sure.
Since the solution is not perfectly solve the problem in 1.4.20, I update the roundup to 1.5.0. If I don't make the change, the roundup application just would not work. After the updating, I modified the file /usr/lib/python2.6/site-packages/roundup/cgi/apache.py line 122 to req.add_cgi_vars(). The roundup app works, but only for a short time. I mean, the same error occurs again after I click some links randomly on the issues tracker website. Then, I have to restart httpd service. Then, I can access the issues tracker site again...
Strange.
from mod_python.
I don't have any ideas... It appears that self.env is getting modified somehow... It'd be interesting to try to see what is in self.env just before this happens. You could do this by inserting something like just before the if self.env['REQUEST_METHOD'] == 'HEAD'
line :
if 'REQUEST_METHOD' not in self.env:
raise Exception(self.env)
The content of env should appear in the error traceback then.
from mod_python.
Okay, I went ahead and installed a little test roundup set up, version 1.5, and it seems to work just find for me (with the req.add_cgi_vars() change), both mod_python 3.4.1 and 3.5.x branch (Python 2.7.5). I've clicked and reloaded pages and I do not get any errors. Another theory I have is that you may have some kind of a python path confusion whereby an older version of roundup apache.py gets loaded, which doesn't have the req.add_cgi_vars(). Your Python is 2.6, but I don't think that should make any difference.
from mod_python.
I tried many times, the problem is still there. Maybe I need to update my Python to 2.7.5 manually, and meantime enable apache with thread support.
LD_PRELOAD=/lib/libpthread.so.0
export LD_PRELOAD
Frustrating!
I will let you know if I get around the problem. Thanks!
from mod_python.
I'm closing this issue since we don't know what the problem is - feel free to re-open if you figure it out.
from mod_python.
Related Issues (20)
- segfault when releasing a thread HOT 16
- Prefer checking .so over the Python version HOT 3
- Linux packages HOT 2
- Tests failing on Red Hat Linux HOT 1
- configure - flex version test needs to be modified.
- Fatal Python error: PyEval_RestoreThread: NULL tstate HOT 2
- Python 3.10 detected as 3.1 HOT 1
- Still live? HOT 3
- Segfault when porting to python 3.10 HOT 2
- detect python version failed HOT 2
- parse_qsl problems HOT 1
- How to configure the Python interpreter path? HOT 4
- UTF-8 characters in page sources no longer supported under Python 3 HOT 1
- Mod Python causing segmentation faults when compiled with Python3.9 HOT 2
- Segfaults when compiled against python 3.11 HOT 1
- Not able to compile mod_python with Python3.11
- Please do a new release for Python 3.11 compat HOT 9
- Python 3.12 failed because imp was removed. HOT 14
- ImportError: Import by filename is not supported.
- Website link outdated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mod_python.