从mac osx上的xampp localhost运行cgi文件

时间:2014-10-11 07:00:19

标签: python apache xampp cgi

我是python脚本的完整菜鸟。我正在关注this教程来做一些iOS的东西。这也包括python cgi script整合。

我已经成功制作了cgi文件,但无法运行它。

文件路径为:/Applications/XAMPP/xamppfiles/cgi-bin/payment-test.cgi

在浏览器中,我将文件运行为:http://localhost/cgi-bin/payment-test.cgi

我收到以下错误:

 Server error!

The server encountered an internal error and was unable to complete your request.

Error message: 
Premature end of script headers: payment-test.cgi

If you think this is a server error, please contact the webmaster.

Error 500

localhost
Sat Oct 11 12:24:29 2014
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1

我已按照this链接修改了httpd.conf

我哪里出错了?我该如何解决这个问题?

0 个答案:

没有答案