Premature end of script headers とは
CGIファイルをWindowsのApacheなどで実行しようとすると、次のような500エラーが出ることがあります。
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
最後の1文で「ログファイルに詳細が書かれている」ということなのでログファイルを見ると次のように出ています。
Premature end of script headers: test.cgi
ディレクトリのパーミッションが間違っているかもしれません。
そのファイルがあるディレクトリのパーミッションが 755 以下であることを確認してください。
Linuxと同じ記述( #!/usr/local/bin/perl とか #!/usr/bin/perl )に合わせる方法
#!/usr/local/bin/perl でも #!/usr/bin/perl でも、どちらでも実行させる方法
スポンサーリンク
関連記事
- SELECTタグで色を選択する場合のサンプル
- 暗号化・複合化を行う ブロック暗号
- [暗号化]ブロック暗号とは(AES/DES/Blowfish PKCS5Padding ECB/CBC IV)
- switch文とif文の違い
- memcachedを使用する(Cache::Memcachedモジュール)
- 指定されたパスが見つかりません couldn't create child process とは
- EclipseでCGI(Perl)の開発環境を作る EPICプラグイン
- Bugzilla [Mozillaのバグ追跡システム]
- YukiWiki (結城ウィキ)
スポンサーリンク






