【发布时间】:2014-05-18 07:05:42
【问题描述】:
我是 CGI 脚本的新手。我已经在 Windows 上安装了 Wamp Server,并在路径 D:\Installation\Python33 安装了 Python。
我已将 CGI 脚本 (test.cgi) 编写为:
print "Content-Type: text/html"
print
print "<html><head><title>Books</title></head>"
print "<body><h1>Books</h1>These are the books</body></html>"
我将它保存在 C:\wamp\www\ 目录下。 当我从浏览器运行它时,它给了我错误“内部服务器错误
服务器遇到内部错误或配置错误,无法完成您的请求。”
我检查了 apache_error.log 显示:
[Sun May 18 12:30:13 2014] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't create child process: 720003: test.cgi
[Sun May 18 12:30:13 2014] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified. : couldn't spawn child process: C:/wamp/www/test.cgi
我觉得这里需要设置Python Path。
我在这里发现了类似的问题:
internal server error (500) in simple cgi script
但找不到如何在 windows 上设置 python 路径。请帮忙。
提前致谢。
【问题讨论】: