URN Logo
UNIX Resources » Linux » China Linux Forum » Python 编 程 » 20 » Mod_python error: "PythonHandler mptest"
announcement 声明: 本页内容为中国Linux论坛的内容镜像,文章的版权以及其他所有的相关权利属于中国Linux论坛和相应文章的作者,如果转载,请注明文章来源及相关版权信息。
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.net
  业界新闻与评论
  自由软件杂谈
  IT 人生
  Linux软件快递
  翻译作坊
  Linux图书与评论
  GNU Emacs/XEmacs
  Linux 中文环境和中文化
  Linux桌面与办公软件
  Linux 多媒体与娱乐版
  自由之窗Mozilla
  笔记本电脑上的Linux
  Gentoo
  Debian 一族
  网络管理技术
  Linux 安装与入门
  WEB服务器和FTP服务器
  域名服务器和邮件服务器
  Linux防火墙和代理服务器应用
  文件及打印服务器
  技术培训与认证
  Linux内核技术
  Linux 嵌入技术
  Linux设备驱动程序
  Linux 集群技术
  LINUX平台数据库
  系统和网络安全
  CPU 与 编译器
  系统计算研究所专栏
  Linux下的GUI软件开发
  C/C++编程版
  PHP 技 术
  Java&jsp技术
  Shell编程技术
  Perl 编 程
  Python 编 程
  XML/Web Service 技术
  永远的Unix
  FreeBSD世界
   
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)]
 
Subject: Mod_python error: "PythonHandler mptest"
Author: czz    Posted: 2004-02-13 17:30    Length: 1,401 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]
Subject: Re: Mod_python error: "PythonHandler mptest"
Author: czz    Posted: 2004-02-13 18:45    Length: 232 byte(s)
[Original] [Print] [Top]
我按照文档,比较发现问题在“PythonHandler mptest ”。我这里的PythonHandler后面是什么,下面就是某个模块没有找到。

去掉PythonHandler ,就直接返回源代码。那么PythonHandler 是什么意思呢?


[Original] [Print] [Top]
Subject: Re: Mod_python error: "PythonHandler mptest"
Author: python23    Posted: 2004-03-21 11:56    Length: 219 byte(s)
[Original] [Print] [Top]
Hanlder就是说你的每个请求都要被Handle处理,这个 mptest 就是,不管你访问的是哪个页面,都必须先由mptest来先处理过,由他来决定的的请求是否符合要求,或做一些处理等等。这样就更灵活了, :-)
我对Mod_python 有些兴趣,
----
when i first met python... thats fate!
[Original] [Print] [Top]
« Previous thread
大家看看这个中文问题如何解决?
Python 编 程
20
Next thread »
推荐一个门户软件
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
备案序号: 京ICP备05006143    webmaster: webmaster@unixresources.net
This page created on 2008-07-17 04:11:44, cost 0.072651863098145 ms.