|
|
|
|
| Mod_python error: "PythonHandler mptest" |
 Mod_python error: "PythonHandler mptest" - czz [ 2004-02-13 17:30 | 1,401 byte(s)]
 Re: Mod_python error: "PythonHandler mptest" - czz [ 2004-02-13 18:45 | 232 byte(s)]
 Re: Mod_python error: "PythonHandler mptest" - python23 [ 2004-03-21 11:56 | 219 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
Mod_python error: "PythonHandler mptest"
Traceback (most recent call last):
File "/usr/src/build/276253-i386/install/usr/lib/python2.2/site-packages/mod_python/apache.py", line 320, in HandlerDispatch
File "/usr/src/build/276253-i386/install/usr/lib/python2.2/site-packages/mod_python/apache.py", line 496, in import_module
ImportError: No module named mptest
上面是我得到的错误信息。我是在访问http://192.168.0.29/test/mptest.py的时候得到的。
我通过rpm安装了mod_python之后,修改http.conf文件,add the fllowing lines to this file:
<Directory /var/www/html>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On
</Directory>
ok,i 'll show the python package installed on:
[root@no29 test]# rpm -qa|grep python
python-optik-1.4.1-1
gnome-python2-gtkhtml2-2.0.0-2
mod_python-3.0.3-3
gnome-python2-bonobo-2.0.0-2
gnome-python2-2.0.0-2
python-2.2.3-7
libxml2-python-2.5.11-1
rpm-python-4.2.1-0.30
gnome-python2-canvas-2.0.0-2
[root@no29 test]#
the OS is fedora cr 1
help me,help me.
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
我按照文档,比较发现问题在“PythonHandler mptest ”。我这里的PythonHandler后面是什么,下面就是某个模块没有找到。
去掉PythonHandler ,就直接返回源代码。那么PythonHandler 是什么意思呢?
|
|
|
[Original]
[Print]
[Top]
|
|
[Original]
[Print]
[Top]
|
Hanlder就是说你的每个请求都要被Handle处理,这个 mptest 就是,不管你访问的是哪个页面,都必须先由mptest来先处理过,由他来决定的的请求是否符合要求,或做一些处理等等。这样就更灵活了, :-)
我对Mod_python 有些兴趣,
|
|
|
----
when i first met python... thats fate!
|
|
[Original]
[Print]
[Top]
|
|
|