« ただいま | トップへ戻る | TORおわた »

2005年09月13日

Premature end of script headers

#!/usr/bin/perl

print "Content-type: text/plain\n\n";
print "test\n";

これで出るエラー。解決方法思いつかねぇ。
.htaccessには
 Options Includes ExecCGI
 AddType application/x-httpd-cgi .cgi
 AddHandler cgi-script .cgi
書いてあるからOKだと思ったんだがなぁ…?

ボスケテ。

投稿者 togabito : 2005年09月13日 14:52

Trackback Pings

このエントリーのトラックバックURL:
http://aaa.jspeed.jp/~togabito/cgi-bin/mt/mt-tbx.cgi/301

コメント

#!/usr/bin/perl

#!/usr/bin/perl --
にしてみるとか。Redhat9とかだとこれが必要。

#っていうかエラー内容を書けと

投稿者 showyou : 2005年09月13日 15:51

ファイルの改行コードの種類によっても挙動が変わるようで.
emacsで言うところのeuc-jp-unixにしたらOK, euc-jp-mac, euc-jp-dosではNGでした.

投稿者 murashin : 2005年09月14日 01:10

Server error!

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

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

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


-- つけんのは無駄でした。
改行コードはnkfで色々いじったけど無駄でした。
orz

投稿者 togabito : 2005年09月14日 15:52

コメントしてください




保存しますか?