- 论坛徽章:
- 0
|
正在用apache和python作网页,想用psp,但是不知道如何配置apache让他支持psp,我的系统上已经安装了mod_python,可是我按照别人说的在apache得住配置文件加入了下面的命令,访问却出现错误。
Alias psp /var/www/psp
<Directory /var/www/psp-bin>
AddHandler mod_python .psp
PythonHandler mod_python.psp
PythonDebug On
</Directory>
在mod_python.psp里面复制了
<html>
<%
if form.has_key('name'):
greet = 'Hello, %s!' % form['name'].capitalize()
else:
greet = 'Hello there!'
# end
%>
<h1><%= greet %></h1>
</html>
然后在浏览器中访问http://localhost/psp/mod_python.psp提示错误。
Mod_python error: "PythonHandler mod_python"
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 291, in HandlerDispatch
arg=req, silent=hlist.silent)
File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 531, in resolve_object
raise AttributeError, s
AttributeError: module '/usr/lib/python2.4/site-packages/mod_python/__init__.pyc' contains no 'handler'
清各位高手指点迷津,这是什么错误???该怎么处理????万分感激 |
|