安装mod python时,出现如下错误.请各位帮帮忙...谢谢
软件版本:
python-2.6msi
mod_python-3.3.1.win32-py2.6-apache2.2.exe
apache_2.2.14-win32-x86-no_ssl.msi
httpd.conf配置:
<Directory "D:/website/python">
AddHandler mod_python .py
PythonHandler fetchpage
PythonDebug On
PythonPath "sys.path+['D:\\website\\python']"
#这里是网上找到解决方案说需要加上 PyahonPath
</Directory>
在modules 目录下也有mod_python.so这个文件
在python中也发现加载到了 mod_python 这个包
运行时提示错误:
MOD_PYTHON ERROR
ProcessId: 3232
Interpreter: '10.8.8.246'
ServerName: '10.8.8.246'
DocumentRoot: 'D:/website'
URI: '/python/fetchpage.py'
Location: None
Directory: 'D:/website/python/'
Filename: 'D:/website/python/fetchpage.py'
PathInfo: ''
Phase: 'PythonHandler'
Handler: 'fetchpage'
Traceback (most recent call last):
File "D:\Python26\lib\site-packages\mod_python\importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)
File "D:\Python26\lib\site-packages\mod_python\importer.py", line 1206, in _process_target
object = apache.resolve_object(module, object_str, arg, silent=silent)
File "D:\Python26\lib\site-packages\mod_python\apache.py", line 696, in resolve_object
raise AttributeError, s
AttributeError: module 'D:\website\python\fetchpage.py' contains no 'handler'
MODULE CACHE DETAILS
Accessed: Wed Jun 29 09:40:42 2011
Generation: 0
_mp_724a9517053291670d8bf23f2cc9d994 {
FileName: 'D:\\website\\python\\fetchpage.py'
Instance: 1 [IMPORT]
Generation: 1
Modified: Tue Jun 28 15:43:56 2011
Imported: Wed Jun 29 09:40:42 2011
}
最开始安装的是
软件版本:
python-2.5msi
mod_python-3.3.1.win32-py2.5-apache2.2.exe
apache_2.2.14-win32-x86-no_ssl.msi
发现不行,然后换现在的版本还是不行。
在网上搜索了很多信息,发现很多人也有过类似的问题,也很多人都一次安装成功。
谁能帮忙解决下,感激不尽。