• ベストアンサー

分かりません。誰か教えて

え~~!はっきり言ってCGIはど素人です。 サーバーはインターQを使用しています、そこで、掲示板を作成しようと思ってるのですがうまいこといきません。 インターQにのってるテスト用のCGIをアップしても、うまいこと表示されません。 で、私が用意したCGIをアップしてアドレスのアクセスするとこのようなエラーがでます。 「CGIWrap Error: Execution of this script not permitted Execution of (/export/home/m/e/8/4/me101384/./cgi-bin/test.cgi) is not permitted for the following reason: Script is not executable. Issue 'chmod 755 filename'」 この場合、なにが良くないんでしょう? 分かる方教えてください。

  • CGI
  • 回答数4
  • ありがとう数2

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

  • ベストアンサー
  • sinx
  • ベストアンサー率29% (14/47)
回答No.1

パーミッションの設定はされていますか? 設定されていなければ設定してください [設定例]  .cgi:705  .pl:604  .dat、.log等のログファイル:606  フォルダ:705 だめなら707  .html、画像等:604 もし設定されていれば、その設定を補足してください。

osugi415
質問者

補足

「require './cgi-lib.pl'; require './jcode.pl';」 の設定のことでしょうか? この部分を直せばいいのですか?

その他の回答 (3)

  • yuki32
  • ベストアンサー率44% (26/59)
回答No.4

#3の方の回答と、回答の補足のやりとりを見て思ったんですけど、アクセス権(パーミッション)の設定の仕方が分からないのかな? ファイルをアップロードしたときに使用した「ファイル転送ソフト」などを使って、 サーバーと繋がった状態にして(いつでもファイルの転送や削除ができる状態のこと)、サーバー上にあるファイルを右クリックしてメニューを開くと、 アクセス権限(ファイル権限・パーミッションなど、使用しているソフトによって名前が変わるが)の変更の項目があるので、それをクリックして、 指定されたパーミッションの数字になるように設定するんですよ。。

osugi415
質問者

補足

うん、それは理解できました。

  • madman
  • ベストアンサー率24% (612/2465)
回答No.3

このメッセージは、CGIなのにファイル権限が755になっていないので、 [chmod 755 fikename]しろと言っています。 目的のファイルのあるサーバにログインし、ファイルのあるディレクトリで chmod 755 test.cgi と実行すれば動きます。

osugi415
質問者

補足

本当に素人ですいません(^^; これはアドレスの最後で入力するすればいいのですか? そうすると、こんなエラーがでました。 「CGIWrap Error: Couldn't find user and script name, check your URL. Couldn't find user and script name, check your URL.」 CGIのSCRIPTはどう指定するのですか?

  • yuki32
  • ベストアンサー率44% (26/59)
回答No.2

パーミッションは全部あってると仮定して・・。 InterQは、普通のページを呼び出すときは、 http://www.interq.or.jp/aaaa/bbbb/cccc.hrm と、なりますけど、 cgiを呼び出すときは、 http://cgi.members.interq.or.jp/aaaa/bbbb/cccc.cgi に、なりますよ。

osugi415
質問者

補足

この部分に関しては大丈夫です。

関連するQ&A

  • CGI-PLANTさんの「切り出し日記」

    こんにちわ。 ここんとこ、CGIの質問ばかりですいません… で、今回は、CGI-PLANTさんの「切り出し日記」なんですが、昔、一回使ったことがあり、そのときは、ふっつ~に動きました。 最近また使おうと思ってHPからDLしてサーバへUPして、アクセス権も変更して、いざ行かん!と思ったら、エラーが出て動きません……perlのパスはあってるし、他はまだいじってないし…アクセス権が違うとは考えにくいですし… errorは「CGIWrap Error: Script Execution Failed CGIWrap encountered an error while attempting to execute this script: Error Message: No such file or directory Error Number: 2 This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. If you are not the owner of this script, please forward this error and the URL that caused it to the script owner. That is often the component in the URL right after /cgiwrap/. 」 って感じです。翻訳機かけても意味不明だし、#!/.../perl --'って書いてあるところを見るとパスが違うみたいだけどあってるし…分かる人いますか? 宜しくお願いします

    • 締切済み
    • CGI
  • CGIが分かりません

    ホームページをリニューアルするということで、一度アップしていたものをすべて削除し、新しく作り直したホームページをFFFTPでアップしました。 すると、以前まで使えていたフォームメールが使えなくなってしまいました。 「予約」と「お問合せ」と2つ作っていたのですが、「お問合せ」のほうはなぜかうまく繋がるのですが、「予約」のほうは以下のようなエラー文がでてしまいます。 CGIWrap Error: Script Execution Failed -------------------------------------------------------------------------------- CGIWrap encountered an error while attempting to execute this script: Error Message: Permission denied Error Number: 13 This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. This is typically a problem if the script was edited or uploaded from a DOS/Windows/Macintosh station to a unix based server. If you are not the owner of this script, please forward this error and the URL that caused it to the script owner. That is often the component in the URL right after /cgiwrap/. -------------------------------------------------------------------------------- Local Information and Documentation: Contact Name: Administrator Contact EMail: admin Server Data: Server Administrator/Contact: admin Server Name: www.tsurugagolf.co.jp Server Port: 80 Server Protocol: HTTP/1.1 Virtual Host: www.tsurugagolf.co.jp Request Data: User Agent/Browser: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6.6) Request Method: POST Remote Address: 210.143.245.129 Remote Port: 59165 Extra Path Info: /cgi-bin/yoyaku/postmail/postmail.cgi 削除してアップしなおしただけなので、以前使われていたCGIやその他は変更していないつもりなのですが、すべてエラーがでてしまうようになってしまいました。 コンピュータのことはあまり詳しくないので難しくてさっぱりわかりません。 最初のホームページは私が作っていたわけではないので詳しいことはわからないのですが、 新しいホームページのフォームメールは使われていたものをそのまま持ってきました。 すべてが初心者なので困っています。

  • chmod(): Operation not pe

    PHPで、hogeディレクトリを777へ変更したいのですが chmod("./hoge", 0777); とすると、下記エラーになります Warning: chmod(): Operation not permitted どうしたら良いでしょうか?

    • ベストアンサー
    • PHP
  • 見本のCGIをマニュアル通りに置いたのですが

    CGIのテキストどおりに、サンプルCGIをサーバに置いたのですが 下記のようなメッセージがでます。 CGIWrap encountered an error while attempting to execute this script: Error Message: Exec format error Error Number: 8 This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. This is typically a problem if the script was edited or uploaded from a DOS/Windows/Macintosh station to a unix based server. If you are not the owner of this script, please forward this error and the URL that caused it to the script owner. That is often the component in the URL right after /cgiwrap/. 英語がさっぱり分からないのでなにがどうまずいのか全くわかりません。 メッセージの意味の分かる方是非、解説お願いします。

    • 締切済み
    • CGI
  • Perlと画像について

    やまとです。 CGIから、画像を呼び出しています。  CGIファイル:Apache/cgi-bin/test.cgi  画像ファイル:Apache/cgi-bin/image/test.gif  test.cgiでの画像呼出部分:<image src=./test.gif> しかし、画像が出てきません。なぜでしょう? 自分なりに調べてみましたが、大分原因が分かってきました。 error.log見てみると、 c:/apache/cgi-bin/test.jpg is not executable; ensure interpreted scripts have "#!" first line couldn't spawn child process: c:/apache/cgi-bin/top_image.jpg と言うエラーでした。 どうやら、画像ファイルをCGIスクリプトとして見てしまっているようです。 (↑考え合ってますよね) おそらく、httpd.confがおかしい(?)Aliaseですかね(?) ここまで調べてみましたが、対処方法がわかりません。 どなたか、どこを、どう直せば良いのか、 出来るだけ詳しくご教授願えないでしょうか? 宜しくお願いします。

    • ベストアンサー
    • Perl
  • WebサーバthttpdでCGIができません。not a CGI file

    ブラウザでCGIを読み込むと、次のエラーが出ます。 The requested URL '/cgi-bin/test1.cgi' resolves to a file which is marked executable but is not a CGI file; retrieving it is forbidden thttpdがCGIファイルとして認識していないようなのですが、設定のどこに誤りがあるのかわかりません。 CGIファイル、ディレクトリなどは、パーミッション777にしてあります。 また、thttpd.confでは、 ... user=root cgipat="**" として、設定を緩めています。 どなたか心当たりのある方よろしくお願いいたします。

  • アンケートCGIについて

    よろしくお願い致します。 ホームページにアンケートを設置したく、http://www.rescue.ne.jp/cgi/weban/ にあるCGIをダウンロードさせて頂いたのですが、必要なファイルを全てサーバーにアップしたのですが、an.cgiが正常に動作しません。 an.cgiにアクセスしたときに表示されるエラーメッセージは、以下のようになっております。 ---------------------- Script Error The script did not produce proper HTTP headers. Please see the error log to see the detail of the errors. Depending on the server configuration, you can also run thisscript under CGIWrap debugging. Usually, either rename or linkthe script temporarily to a file which ends with .cgidextension, or add a AddHandler cgi-script-debug .cgiline to your .htaccess file. ---------------------- サーバーはxreaを使用しており、パーミッションは705(xrea推奨)でアップしています。他のcgi(メールフォー等)も同様のパーミッションでアップして正常に動作しているので、パーミッションの問題ではないと思うのですが..。 何が原因なのか、お分かりになる方がいらっしゃいましたら、どうかご教授下さいますようお願い致します。

    • ベストアンサー
    • CGI
  • script headers って?

    NO.202703の質問をしたものです。 1.Premature end of script headers: c:/www/public_htm/up_file.cgi 2.String found where operator expected at c:\WWW\PUBLIC~1\UP_FIL~1.CGI line 59, near "open INDD1, "$indd1"" 3.syntax error at c:\WWW\PUBLIC~1\UP_FIL~1.CGI line 58, near "open(INDD1, "$indd"" 4.Execution of c:\WWW\PUBLIC~1\UP_FIL~1.CGI aborted due to compilation errors. 2.3.4.のエラーについては、解決?できました。 (エラー行をコメント(#)にしたりしてるうちに・・・原因はよくわかりませんでしたが・・・) 1.のエラーの意味がわかりません。  script headers って何のことなんでしょうか? ※ このエラーログはApacheのサーバーのログです ※ このCGIは、フォームデータを受けっとてファイルを更新するようになっています。

    • ベストアンサー
    • Perl
  • すごく基本的な事なのでしょうが・・わからないんです

    ある人のHPに行こうとすると、次のメッセージが でてきました。  どうすればいいのかわかりません。 どこでどの様な操作をすれば解決するのでしょうか? CGI Error The error was detected while processing this request. Be sure of followings: The CGI script does exist. The permission of CGI script is 755. The Perl path in CGI script is #!/bin/perl. CGIスクリプトの呼び出し中にエラーが発生しました。 下記の点をご確認ください。 ・CGIスクリプトが存在すること。 ・CGIスクリプトのパーミッションが755であること。 ・CGIスクリプトのperlのパスが#!/bin/perlであること。

    • ベストアンサー
    • CGI
  • Mac OSX LionでCGI/Ruby動かず

    Mac OSX Lionを使っています。 CGIでRubyを使いたいと思い、 以下のことを試したのですが、 500 Internal Server Error となってしまいます。 ◆やったこと 以下のファイルを /Library/WebServer/CGI-Executables に置きました。 (改行コードはLFとしました) --test.cgi--- #!/usr/bin/ruby print "Content-Type: text/html¥n¥n" puts "Hello Ruby" ----- そしてchmod 777としてブラウザから http://localhost/cgi-bin/test.cgi にアクセスしたところ、 500 Internal Server Error となってしまいます。 その際の/var/log/apache2/error.logは、 Premature end of script headers: test.cgi とだけ表示されます。 なんだか一番最初の所でつまづいてしまい、 めげそうになっております。 よろしくご教授ください。

    • ベストアンサー
    • CGI