【CGI】メールフォームが動作しない

このQ&Aのポイント
  • こちらの「基礎メール2nd」というものをさくらサーバーで運用しようと考えています。
  • sendmail.cgiファイルを変更し、届くメールアドレスやサーバーパスを設定しましたが、送信ボタンを押すと「Internal Server Error」と表示されます。
  • 原因が分からず困っています。お知恵をお貸しください。
回答を見る
  • ベストアンサー

【CGI】メールフォームが動作しない

http://apps.cside.com/ こちらの「基礎メール2nd」というものをさくらサーバーで運用しようと考えています。 下記の階層にし、パーミッションも括弧の様に設定しました。 form/ (755) │ ├ input.html (644) ├ finish.html (644) ├ sendmail.cgi (755) │ ├ data/ (777) │ └ lastmail.cgi (666) │ ├ lock/ (777) │ └ flock.cgi (666) │ └ lib/ (755) ├ ap_mimeenc.pl (644) └ jcode.pl (644) そのほか変更したのは 「sendmail.cgi」というファイルを変更しました。 1行目に #!/usr/bin/perl と変更。 $sendmail = '/usr/sbin/sendmail'; ここはさくらサーバー指定のパスに $mail_to_addr = '*****.sakura.ne.jp'; 実際に届いてほしいアドレスに。 という具合に変更しました。 そのほかはとりあえず動くことを確認したかったので、編集しておりません。 この状態で送信ボタンを押したところ。 ■■■■■■■■■■■■■■ Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, support@sakura.ad.jp 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. Apache/1.3.39 Server at *****.sakura.ne.jp Port 80 ■■■■■■■■■■■■■■ と表示されました。 原因が分からず困っています。 他に必要な情報がありましたらいってください。 宜しくお願いいたしますm(__)m

  • CGI
  • 回答数1
  • ありがとう数0

質問者が選んだベストアンサー

  • ベストアンサー
noname#56882
noname#56882
回答No.1

さくらインターネットのサポートを見ましたところ 「ディレクトリパーミッションは755 または 705」と記されていました。 http://support.sakura.ad.jp/support/manual/rs/tech_cgi.shtml ですのでパーミッションの設定を data/ (777) → data/ (755) lock/ (777) → lock/ (755) に変更してみてください。 「推奨するファイルロック関数」は「flock」が可能のようですので 「$lock_method = 1;」は変更する必要はありません。 他には lib/ (755)の中に「ap_mimeenc.pl (644)」と「jcode.pl (644)」を入れてください。 (たぶん書き間違いだと思いますが念のため書かせていただきました) あと「$mail_to_addr = '*****.sakura.ne.jp';」ですが 『$mail_to_addr = '*****@sakura.ne.jp';』が正しい表記です。 【@】マークが抜けています。 当方のサーバで試してみましたがこれできちんと表示されましたよ。

関連するQ&A

  • require文が実行できない

    perl で require 'cgi-lib.pl'; または require "jcode.pl"; を実行すると、 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@mshome.net 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. というメッセージが出ます。(cgi-lib.pl、jcode.plは同じディレクトリにあります。)

  • 新しいCGIをアップするたびに…

    新しいCGIをアップするたびに『Internal Server Error』となるんです。 今回も、下記のエラーで困っています。皆さん、アドバイスをお願い致します。 The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, ××@○○○.△△.ne.jp 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. プログラムの内容は、カレンダーです。 ファイルは、アスキーモードでアップし、パーミッションは755で行ないました。 また、サーバーがlinuxの為、改行コードを『LF』に変更して、アップし直してみましたが同じでした。 また、パスもサーバー指定の『#!usr/bin/perl』になっています。 パーミッションも755、705の両方で試してみました。 しかしだめだったのです。 よろしくお願い致します。

    • ベストアンサー
    • CGI
  • fedoraにcgi

    mkdir でディレクトリを作って vi who cgiを作って 内容は #!/usr/bin/perl print "Content-type: text/html\n\n"; print "<html><body>\n"; print "<pre>"; print 'whoami'; print "</pre>"; print "</body></html>"; なのですが、 ブラウザでテストすると Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, ****@hotmail.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. Apache/1.3.29 Server at test.modena.com Port 81 Please contact the server administrator, ****@hotmail.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. Apache/1.3.29 Server at test.modena.com Port 81 という風に表示されます。 設定が違っているのでしょうか?

  • リナックスのサーバーでCGIを動かそうとしたらば

    上記質問タイトルのような事をした所下記のようなエラーメッセージが出てきました。 ファイルの入れた場所はcgi-binの中に入れました。 最初のファイル名はindex.cgiです。 パーミッションも755に変更しました。 どのようなエラーなのか教えて頂けるかたどうか教えて下さい。 ///エラーメッセージ////////////// Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, mail@it-service.co.jp 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. -------------------------------------------------------------------------------- Apache/1.3.17 Server at 192.168.0.29 Port 80

  • CGIの暴走で、500エラーになり修復できません。

    現在、借りているサーバーで大量にメールマガジンを配信したところ急に、他のショッピングカートなどの CGIが以下の様なエラーになりました。 どうすれば修復できるのでしょうか? > Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root@ドメイン名 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. -------------------------------------------------------------------------------- Apache/1.3.33 Server at ドメイン名 Port 80

    • ベストアンサー
    • CGI
  • お問い合わせフォームのテストについて

    現在運営されているサイトで、 お問い合わせフォームの一部を変更する という案件を、手伝っています。 お問い合わせフォームですので、 正しく届いているか、エラー画面などが正しく表示されるかなどの 確認のため、まずは自分のテストサーバーにデータを移したのですが、 そこでは送信ボタンを押してもエラーが出てしまいます。 これはなぜでしょうか。。 エラーは以下の文章です ==================================================================== Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, support@sakura.ad.jp 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. Apache/1.3.42 Server at www"ここは自分のドメインです".com Port 80 ==================================================================== お問い合わせフォームのcgiは、cgi-binというフォルダに格納されています。 私の行った作業は、 まずは、テスト環境に移すために、自分のもっているレンタルサーバーの ルート直下(www直下)に「test」というフォルダをつくり、 そこに、請け負ったサイトの現在のデータを全てコピーして入れました。 それで試したところ、上記のエラーになりました。 もしかしたら、 cgi-binというフォルダは、ルート直下(www直下)におかなければならない、 などの決まりがあるのでしょうか。。? (現在は www > test > cgi-bin という状態です) ご存知の方いらっしゃいましたら 何卒よろしくお願いいたします。

    • ベストアンサー
    • CGI
  • 問い合わせメールフォームの不具合

    お世話になります。 これまで、管理してもらってたホームページ屋さんが つぶれてしまい、いくつか預けていたホームページを 返してもらいました。 ですがそのうち1つのサイトの問い合わせフォームに不具合が出て 困っています。 問い合わせフォームを記入して「確認」ボタンを押すと 次のようなエラーメッセージが出ます。 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, 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. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. ---------------------------------------------------------- 正常に使えるようにするにはどうすればいいでしょうか? ちなみにサーバへはいつでも入れます。中はよくわかりませんが。

    • ベストアンサー
    • PHP
  • apacheでcgi-binの中のファィルをcgiと

    アップローダーを設置したくて apacheでローカルで確認しているのですがcgi-binの中に.gifや.jpgなどを入れると ブラウザで The server encountered an internal error or misconfiguration and was unable to complete your request. と出てしまい.gifや.jpgが表示されません。設定をどのようにすれば表示されるのでしょうか? .cgiや.plはcgiとして認識されて動作しています。

  • 「使える ねっと」 の フォームメール設定

    よろしくお願いします。 今、「使える ねっと」 の フォームメール設定に戸惑っています。 http://www.tsukaeru.net/ なんど作成しようとしても、 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@tsukaeru.net 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. というエラーが出てしまいます。 「使える ねっと」 の フォームメール設定の経験があるかた、 何かお気づきの点がありましたらアドバイスを頂けると助かります。 また、設定箇所が多くありますが、何がどんな設定なのか良く分かりません。 もし宜しければ、こちらもアドバイスを頂けると非常に助かります。 分からないことばかりで申し訳ありません。 どうぞ宜しくお願い致します。

  • はじめまして、レンタルサーバーでCGI(sendmail)に苦戦中です

    はじめまして、レンタルサーバーでCGI(sendmail)に苦戦中です 皆さんの知恵を教えてください 現在の状況  サーバー : 大塚商会 アルファメール         新Webに変更済み(CGI可能) 作り方として、直接CGIから実行せず、htmlからメールフォームを表示して そして、sendmail.cgiを実行する形式にしました 参考として ttp://www.site-cooler.com/kwl/cgi/5.htm を手本とさせていただきました 上記のファイルをダウンロードして、必要な箇所を変更しました   ・sendmail     パス:/usr/sbin/sendmail   ですが、なぜか…sendmail.htmは表示できて、送信ボタンを押すとエラーになります   「 internal Server Error 」 です 色々模索中なのですが、全然、解決の目処が立っておりません 模索中なのは  ●パーミッション : アルファメールでは「700」が推進とあったので700にしてみたら   sendmail.htmすら、動かず、755に変更しました   とりあえず、メールフォーム(htm)は表示されます  ●sendmail.cgiは、755・700とも動きません  ●CGIの動作環境は、     ttp://www.alpha-mail.jp/support/server_info/pg/cgi.html   です 下記のように変更しました ------------------------------------------------------------------ #!/usr/bin/perl # 初期設定 -----------------------------------------------# # # sendmailへのパス (変更済み) # $sendmail = '/usr/sbin/sendmail'; # # jcode.plへのパス # $jcode = './jcode.pl'; # # メールの送付先 # $to = 'QQQQQQQ@QQQQQQ.co.jp'; # # メールの題名 # $subject = 'CGIメール送信サンプル'; # # 確認ページより戻るでリンクされるURLを指定 # $back = 'XXX://XXX.XXXXX.XXXX/'; # # 呼出し元。チェックする時はhttpから始まるURLを指定 # $referrer = ''; --------------------------------------------------------- どうかアドバイスをお願いします

    • ベストアンサー
    • CGI

専門家に質問してみよう