アプリ版:「スタンプのみでお礼する」機能のリリースについて

perl 初心者です。

apache を起動させ(起動画面は表示)、perl のファイルを IE で表示させようとして、print文を実行しても、print文がそのまま表示されるだけになっています。

perl のパスは、#! d:/perl/bin/perl です。
(コマンドラインから実行すると実行できるので、インストールは正常です。)
(XP以前だったと思いますが、そのときは IEで、長文のプログラムが起動できていましたが。)

A 回答 (2件)

Windows 版 apache は1回しかいじったことがないのではずしているかもしれませんが、



1.
apache の動作を規定する設定ファイル httpd.conf において、CGI として動作する拡張子の指定はなされていますか?

# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
AddHandler cgi-script .cgi .pl

2.
perl のスクリプトを設置しているディレクトリについてのオプションで ExecCGI は入れていますか?

3.
あと、apache の error.log を参照するとなぜ期待する動作をしていないのかヒントがあるかもしれません。

この回答への補足

お礼の 2. で 『perl のスクリプトを設置ディレクトリ』と 『perl を設置デディレクトリ』を間違えました。すみません。

補足日時:2005/08/27 07:19
    • good
    • 0
この回答へのお礼

ありがとうございます。
1. AddHandler cgi-script .cgi に .pl を追加
2. Appache の設定ファイルに "perl のスクリプトを設置しているディレクトリ設定" がないのですが、ドキュメントルートのオプションでは
  Options All
に変更してあります。
3. error.log (最新)
Fri Aug 26 22:16:07 2005] [notice] Apache/2.0.54 (Win32) configured -- resuming normal operations
[Fri Aug 26 22:16:07 2005] [notice] Server built: Apr 16 2005 14:25:31
[Fri Aug 26 22:16:07 2005] [notice] Parent: Created child process 1884
[Fri Aug 26 22:16:09 2005] [notice] Child 1884: Child process is running
[Fri Aug 26 22:16:09 2005] [notice] Child 1884: Acquired the start mutex.
[Fri Aug 26 22:16:09 2005] [notice] Child 1884: Starting 250 worker threads.
[Fri Aug 26 22:39:30 2005] [notice] Parent: Received restart signal -- Restarting the server.
[Fri Aug 26 22:39:30 2005] [notice] Child 1884: Exit event signaled. Child process is ending.
[Fri Aug 26 22:39:30 2005] [notice] Apache/2.0.54 (Win32) configured -- resuming normal operations
[Fri Aug 26 22:39:30 2005] [notice] Server built: Apr 16 2005 14:25:31
[Fri Aug 26 22:39:30 2005] [notice] Parent: Created child process 2468
[Fri Aug 26 22:39:30 2005] [notice] Child 2468: Child process is running
[Fri Aug 26 22:39:31 2005] [notice] Child 2468: Acquired the start mutex.
[Fri Aug 26 22:39:31 2005] [notice] Child 1884: Released the start mutex
[Fri Aug 26 22:39:31 2005] [notice] Child 2468: Starting 250 worker threads.
[Fri Aug 26 22:39:32 2005] [notice] Child 1884: Waiting for 250 worker threads to exit.
[Fri Aug 26 22:39:32 2005] [notice] Child 1884: All worker threads have exited.
[Fri Aug 26 22:39:32 2005] [notice] Child 1884: Child process is exiting

 で、まだ 解決していません。

お礼日時:2005/08/27 07:11

#! d:/perl/bin/perl



ここにスペースが入っていると、うまくゆかないperlのバージョンがあります。一度スペースを削除して、試してみられてはどうですか?

この行は See-Bang行 と言って、スペースを入れないのが本来の姿です。

この回答への補足

Perl の version は ActivePerl 5.8.7 です。

補足日時:2005/08/27 06:40
    • good
    • 0
この回答へのお礼

ありがとうございます。
スペースをはずしても、うまくいきませんでした。(単純な設定ミスであろうとは思いますが)

お礼日時:2005/08/27 06:44

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!