sourceforge リポジトリでサンプル プログラム test.py をホストしようとしています。ディレクトリからファイルをアップロードし/home/project-web/motiur/cgi-bin/
、motiur.sourceforge.net/cgi-bin/test.py
. 残念ながら、ヘッダーの早期終了を示唆するエラーが発生しました。
test.py のソースコード:
#!/usr/local/bin/python
import cgi, cgitb
print "Content-type:text/html\n"
print "<html><body>This is another test</body></html>"
正確なエラーは次のとおりです。
An error has been encountered in accessing this page.
1. Server: motiur.sourceforge.net
2. URL path: /cgi-bin/test.py
3. Error notes: Premature end of script headers: test.py
4. Error type: 500
5. Request method: GET
6. Request query string:
7. Time: 2013-01-12 14:49:39 UTC (1358002179)
ところで、私は Windows で filezilla を使用しており、ファイルのアクセス許可を 755 に設定していました。つまり、誰でもファイルを実行できます。これは初心者の質問です。少し助けていただければ幸いです。ありがとう。