Install, Setup and Configure CGI and Perl in Windows XPインストールすると、セットアップおよび構成のCGIとperlでは、 Windows XP

Prerequisite 前提条件

Obvioulsy, a web server needs to be running on the Windows machine. obvioulsy 、あるウェブサーバーにする必要がありますWindowsマシン上で実行されています。 Refer to thisを参照して、この postポスト for instructions on how to install Apache2 in Windows. apache2のをインストールする方法についての説明をされています。

Download ActivePerl ダウンロードにActiveState

Download ActivePerl from ActiveStateのダウンロード http://www.activestate.com/Products/ActivePerl/?mp=1 http://www.activestate.com/products/activeperl/?mp=1 .です。 Click on Free Download to start the download process.無料でダウンロードをクリックしてダウンロードを開始するに処理します。 There is no need to input any contact info.には任意の連絡先情報を入力する必要はありません。 Just leave it blank and press ‘Next’ to start the download.空白のままだけを押して[次へ]ダウンロードを開始します。

Then download the lastest version of Windows MSI package.最新のバージョンのWindowsを入力し、ダウンロードしてMSIパッケージです。

Install ActivePerl インストールにActiveState

Start the installation by double clicking the setup file.起動してインストールをダブルクリックして、セットアップファイルです。 Follows the on-screen instruction.次のようにして、画面の指示します。 If you will be using Perl CGI programs and want to maintain some level of portability between both Linux machines and Windows machines, you may want to install Perl at the same location on your Windows machine as it is on most Linux machines.する場合はPerlのCGIプログラムを使用して、いくつかのレベルの可搬性を維持したいの間にLinuxマシンとWindowsの両方のマシンでは、をインストールすることができますPerlのは、同じ場所をWindowsマシンに、これはほとんどのLinuxマシンです。

For example, on Linux machine, Perl is located at /usr/bin/perl and so every Perl program that I write begins with #!/usr/bin/perl .たとえば、 Linuxマシン、 Perlはそれは/ usr / bin / perlを、したがって、すべてのPerlのプログラムを書いている今から始まります# ! / usr / binに/ perlをします。 So, it’s best when install Perl on an Windows machine, instead of installing it in the default location (ie C:\perl), install it in C:\usr instead, so that the Perl executable is located at /usr/bin/perl.したがって、 Perlの上で最高のWindowsマシンにインストールするときに、それをインストールする代わりに、デフォルトの場所(例えばC : \ Perlの) 、インストールすることではC : \ usr代わりに、 Perlのように、実行ファイルがある場所は/ usr / bin / perlをします。 This allows codes written on Windows machine been moved to, without changes, to Linux machine, and have it run there, and vice versa.これにより、コードを書いてWindowsマシンに移行され、変更せずにLinuxマシン、それを実行して存在し、逆も可能です。

To change the installation path, click on browse button when you’re on the installation screen that prompts you to select which features you want to install.インストールパスを変更するには、 [参照]ボタンをクリックしているときには、インストールを促すメッセージが表示画面を選択するにはをインストールする機能を選択します。 Set it to C:\usr\ if needed.設定することをc : \ usr \場合に必要です。

Make sure that the following options is checked (selected):ことを確認して、以下のオプションがチェック(選択) :
Add Perl to the PATH environment variable Perlの環境変数のパスを追加
Create Perl file extension association Perlのファイルの拡張子を作成協会

Activating CGI CGIの活性化

Open the httpd.conf file for editing by selecting Start > Programs > Apache HTTP Server > Configure Apache Server > Edit the Apache httpd.conf Configuration File. httpd.confファイルを開いて編集を選択しスタート]ボタン> "プログラム" >のApache HTTPサーバ" >構成Apacheのサーバ" >編集してApacheのhttpd.confの設定ファイルです。 Alternatively, open the httpd.conf with any text editor.また、任意のテキストエディタで開いてhttpd.confのです。

In the main directory section, search for Options Indexes FollowSymLinks (at about line 267), and add ExecCGI to the end so it looks like:ディレクトリのメインセクションでは、検索オプションのインデックスfollowsymlinks (約267行) 、および追加の最後にexeccgiので、次のように:

Options Indexes FollowSymLinks ExecCGIオプションのインデックスfollowsymlinks execcgi

Search for the following line and remove the hash mark character (#) to uncomment this line.検索すると、次の行の文字を削除してハッシュマーク( # )をこの行のコメントを外してください。 (You can also change .cgi to .pl, or add .pl behind .cgi if you prefer that perl extention is also treated as cgi files) For example: (変更することもできます。のCGIをします。ポーランド語、または追加します。ポーランド語の後ろです。 PerlのCGIのことを推奨して拡張する場合もCGIファイルとして扱われます)例:

#AddHandler cgi-script .cgi # addhandler CGIスクリプトです。のCGI

Should look like:は、次のよう:

AddHandler cgi-script .cgi .pl addhandler CGIスクリプトです。 CGIで提供します。ポーランド語
orまたは
AddHandler cgi-script .pl addhandler CGIスクリプトです。ポーランド語
orまたは
AddHandler cgi-script .cgi addhandler CGIスクリプトです。のCGI

Save the httpd.conf configuration file, restart the Apache server. httpd.confの設定ファイルを保存して、 Apacheサーバを再起動してください。 Test the configuration as described in Testing Your Web Server CGI Configuration at the end of this article.テストの設定に記載され、ウェブサーバーのCGIの設定のテストの最後には、次の資料です。

Optional: Enabling CGI in Any Directory オプション:任意のディレクトリのcgiを有効に

If you want to use CGI outside ScriptAliased directory (ScriptAlias is usually the Apache2/cgi-bin/), comment out the following line:外部のCGIを使用したい場合はscriptaliasedディレクトリ(設定ScriptAliasは、通常、 apache2/cgi-bin / ) 、次の行をコメントアウトして:

ScriptAlias /cgi-bin/ “C:/Program Files/Apache Group/Apache2/cgi-bin/”設定ScriptAlias / cgi - binに/ " c : /プログラムファイル/ Apacheのgroup/apache2/cgi-bin / "

Should look like:は、次のよう:

#ScriptAlias /cgi-bin/ “C:/Program Files/Apache Group/Apache2/cgi-bin/” #設定ScriptAlias / cgi - binに/ " c : /プログラムファイル/ Apacheのgroup/apache2/cgi-bin / "

Alternatively, if you want to specify just one directory to put all your cgi programs, change the path instead, but makes ure that directory exists.また、 1つだけを指定したい場合は、すべてのCGIプログラムのディレクトリを置く、パスを変更する代わりに、しかし、そのディレクトリにユーリに存在しています。

Should look like (for default settings):は次のように(デフォルト設定) :

ScriptAlias /cgi-bin/ “your_prefer_cgi-bin_direcotry”設定ScriptAlias / cgi - binに/ " your_prefer_cgi - bin_direcotry "

Save the httpd.conf file. httpd.confファイルを保存しています。 Restart the Apache server. Apacheサーバを再起動してください。

Finding Perl Executable Location perl実行ファイルの場所を見つける

If you don’t know where is perl.exe installed to, go to Start -> Search and search for perl.exe.がわからない場合は、インストールされてperl.exeはどこにするには、スタート" ->検索ページと検索をp erl.exeです。 This location is the path to the perl executable that has to be put on the top of all cgi scripts.この場所は、 perl実行ファイルのパスを指定しての上に置くのすべてのCGIスクリプトです。 If you follow default installation procedure, the path should be C:/perl/bin/perl.exe次のデフォルトのインストール手順をする場合は、パスにはC : / perlを/ビン/ perl.exe

For the path to perl.exe path, all of these format are valid: perl.exeへのパスをパスを、これらのすべての形式が有効である:
#!c:/perl/bin/perl.exe # ! c : / perlを/ビン/ perl.exe
#!c:/perl/bin/perl # ! c : / perlを/ bin / perlを
#!/perl/bin/perl.exe # ! / perlを/ビン/ perl.exe
#!/perl/bin/perl # ! / perlを/ bin / perlを

Testing Your Web Server CGI Configuration テストしてWebサーバーのcgiの設定

Save the following test script in your DocumentRoot directory (if you have uncomment ScriptAlias, you can put it anywhere inside your DocumentRoot directory, or if you have set ScriptAlias to some particular directory, put the cgi in that directory only, ie Apache2/cgi-bin) as test.pl or test.cgi (depending on your configuration of the AddHandler line) and modify the first line as required to point to your ActivePerl interpreter:割引率は、次のテストスクリプトにしてDocumentRootディレクトリ(設定ScriptAliasのコメントを外している場合は、任意の場所に置くことができるとしてDocumentRootディレクトリの中か、または設定ScriptAliasを設定する場合は、いくつかの特定のディレクトリ、そのディレクトリに置くだけのcgiをする、すなわちapache2/cgi-ビン)としてtest.plまたはtest.cgi ( addhandlerの設定によっては、このライン)と、必要に応じて変更して最初の行にActiveStateをポイントするようにして通訳:

#!c:\perl\bin\perl.exe # ! c : \ Perlの\ binに\ perl.exe
# ^^^ this must be the first line of the script! # ^ ^ ^このしなければならないのスクリプトの最初の行に! ^^^ ^ ^ ^
# start code #スタート]ボタンをコード

use strict;使用厳格な;
use CGI;使用のCGI ;
my $q = new CGI;マイ$問=新規のCGI ;

# print header and start the markup output #印刷ヘッダーとスタート]ボタンを使用するマークアップの出力

print $q->header( “text/html” ),$q->start_html( “hello from perl cgi!” );印刷$問- >ヘッダー(の" text / html " ) 、 $問- > start_html ( "ハローよりPerlのCGI ! " ) ;
print $q->h2(”hello dave…”);印刷$問- >水素( "ハローデイブ… " ) ;
print $q->end_html;印刷$問- > end_html ;
# end code #終了コード

Now go to今すぐに行く http://localhost/cgi-bin/test.cgi (scripts in Apache2/cgi-bin/ are read as http://localhost/cgi-bin/ by default). (スクリプトをapache2/cgi-bin /デフォルトでは読み取りとしてhttp://localhost/cgi-bin/ ) 。 You should see a page that displays a level two heading with the following text:を表示するページが表示されるはずのレベル2つの見出しは、次のテキスト:

hello dave ハローデイヴ

If you see the above message, CGI is running.詳細については、上記のメッセージが表示する場合、 CGIが実行中です。 If you get a 500 error, go to the last entry in your Apache2/logs/error.log (or the Review Error Log in the Start menu) to see exactly what caused this error.取得する場合に500エラーが発生するには、 apache2/logs/error.logの最後のエントリにして(または[スタート]メニューエラーログに記録した日)を参照し正確には何が原因このエラーが発生します。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要 :これは、機械翻訳ページで提供"現状有姿"を保証します。 Machine translation may be difficult to understand.機械翻訳を理解するのは難しいかもしれません。 Please refer toを参照してください original English articleオリジナルの英語記事索引 whenever possible.いつ可能です。

Share and contribute or get technical support and help atを共有して貢献や技術サポートとヘルプを得る My Digital Life Forums 私のデジタルライフフォーラム .です。



6 Responses to “Install, Setup and Configure CGI and Perl in Windows XP” 6レスポンスを"インストールすると、セットアップおよび構成のCGIとperlでは、 Windows XP "

  1. Install AWStats- Free Logfile Analyzer for Site Statistics » My Digital Life awstats -無料のログファイルアナライザをインストールするサイトの統計情報»私のデジタルライフ
    January 2nd, 2006 02:19 2006年1月2日02:19
    1

    [...] As AWStats is Perl based, a Perl Interpreter need to be installed first to take anvantage of AWStats. [...] awstatsは、 Perlをベースとして、通訳にするPerlの最初にインストールする必要がありますanvantageのawstatsを取る。 For instruction on how to install Perl in Windows machine, check out this article.上の命令でPerlのWindowsマシンをインストールする方法については、チェックアウトこの記事です。 [...]

  2. Besart besart
    July 25th, 2006 20:53 2006年7月25日20:53
    2

    I have installed cgi and configured apache as you said, but i got this erro:私はApacheのインストールおよび構成のCGIによると、しかし、私はこのエラー:

    Internal Server Error内部サーバーエラーが発生しました
    The server encountered an internal error or misconfiguration and was unable to complete your request.サーバーで内部エラーが発生またはミスや、お客様のリクエストを完了することができませんでした。

    Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.ご連絡サーバーの管理者は、ウェブマスター@ localhostのとの情報を、時間にエラーが発生し、何かが原因かもしれない行うことがありますが、エラーが発生します。

    More information about this error may be available in the server error log.このエラーの詳細についてはご利用可能なのはサーバーのエラーログに記録します。

    ——————————————————————————– ---------------------------

    Apache/2.0.58 (Win32) PHP/5.1.4 Server at localhost Port 80 apache/2.0.58 ( Win32 )のphp/5.1.4サーバーにlocalhostのポート80

  3. jackジャック
    May 10th, 2007 19:25 2007年5月10日19:25
    3

    Cool4you,guys. cool4you 、二人とも。

  4. Mitchellミッチェル
    June 20th, 2007 08:09 2007年6月20日08:09
    4

    Just for the record, the above test script throws a 500 error when used as is.念のためにレコードは、上記のテストスクリプトの例外が使用され、 500エラーが発生します。 Maybe it is just a problem with firefox displaying text or something, but the quotation marks are mixed up, so that could lead to problems多分これはFirefoxの表示に問題があるだけのテキストか何か、しかし、二重引用符が混在するように、問題が発生につながる恐れがある : )

  5. Johannaヨハンナ
    October 8th, 2007 23:05 2007年10月8日23:05
    5

    Hi all,こんにちはすべて、

    I really need some help on this subject =)本当に必要ないくつかのヘルプ]をクリックこのアジ研= )

    I have followed the steps above, and changed the quotation marks, and what I get is 9 error messages:私は上記の手順を実行後、および変更して二重引用符、およびどのようなエラーメッセージが表示さ私は9 :

    Backslash found where operator expected at Z.\test.cgi line 1, near “rtf1\”演算子の期待にバックスラッシュが見つかりましたどこz. \ test.cgi 1行目近辺、 " rtf1 \ "
    or ….または… 。 , near “ansi\”近辺、 " ansi \ "
    or ….または… 。 , near “deff0″近辺、 " deff0 "
    or ….または… 。 , near “f1\”近辺、 " F1の\ "
    etc..等です。

    I am a total rookie with these things, any help appreciated =)私はトータルルーキー、これらのものは、任意のヘルプ感謝= )

    Thanks,ありがとう、

    Johannaヨハンナ

  6. Munir munir
    November 28th, 2007 22:14 2007年11月28日22:14
    6

    I did everything you said.私はすべてのあなたと述べた。 But cgi is still not running.しかし、 CGIのはまだ実行されていません。 Please help.お助けします。
    my apache is 2.2マイApacheは2.2

Leave a Reply残して返信

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> これらのタグを使用することができます: <aのhref=のtitle= <abbrのtitle= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント


Custom Search

New Articles新しい記事

Incoming Search Terms for the Article検索用語を受信するには

download perl.exe ダウンロードperl.exe - - install perl on windows xp PerlのWindows XPのインストール - - Perl.exe download perl.exeダウンロード - - perl.exe perl.exe - - apache2 enable cgi CGIのapache2の有効にする - - perl apache2 Perlのapache2の - - perl for windows XP PerlのWindows XP用 - - perl vista Perlのビスタ - - enable cgi apache2 CGIのapache2の有効にする - - install perl on vista Perlのインストールビスタ - - how to install perl on windows XP Windows XP用のPerlをインストールする方法について - - configure perl Perlの構成 - - perl setup download Perlのセットアップをダウンロード - - install perl xp PerlのXPのインストール - - download perl for windows xp PerlのWindows XP用のダウンロード - - PERL for windows vista PerlのWindows Vistaの - - perl download for windows xp Perlのダウンロードfor Windows XPで - - XAMPP Perl CGI XAMPPのPerlのCGIの - - xampp path to perl XAMPPのパスをPerlの - - download perl setup ダウンロードPerlのセットアップ - - perl windows vista PerlのWindows Vistaに - - install perl vista PerlのVistaのインストール - - xampp perl path XAMPPのPerlのパス - - free download perl.exe 無料でダウンロードperl.exe - - perl download xp XPのPerlのダウンロード - - apache2 perl apache2のPerlの - - apache2 cgi enable apache2のCGIの有効にする - - configure cgi CGIの設定 - - how to configure perl Perlのを構成する方法について - - free download perl interpreter 無料でダウンロードPerlのインタープリタ - - INSTALL PERL FOR WINDOWS XP PerlのWindows XPのインストール - - apache2 configure cgi apache2のCGIの設定 - - Perl interpreter for windows XP Perlのインタプリタfor Windows XPで - - all すべての - - how to install perl on vista PerlのはVistaをインストールする方法について - - perl interpreter free download Perlの通訳無料でダウンロードできます - - perl for xp PerlのためXPの - - install perl windows xp PerlのWindows XPのインストール - - perl interpreter vista Perlのインタープリタビスタ - - windows xp cgi Windows XP用のCGI - - how to install perl in windows xp Perlのでは、 Windows XPをインストールする方法について - - perl download for xp XPのPerlのダウンロード - - apache perl configuration ApacheのPerlの設定 - - perl.exe free download perl.exe無料でダウンロードできます - - install perl on xp PerlのXPのインストール - - how to configure cgi を構成する方法についてのCGI - - perl exe download Perlのエグゼダウンロード - - perl setup Perlのセットアップ - - enable cgi in apache2 apache2のcgiを有効にする - - apache2 allow cgi apache2の許可のCGI - - Free Download Perl for Windows XP Windows XP用Perlの無料ダウンロード - - perl interpreter for vista Perlのインタプリタfor Vistaは - - perl for windows XP download PerlのWindows XP用のダウンロード - - apache2 perl setup apache2のPerlのセットアップ - - apache2 configure perl Perlのapache2の設定 - - how to install perl on windows vista Windows VistaでのPerlをインストールする方法について - - Perl Windows XP PerlのWindows XPの - - perl setup for windows PerlのセットアップをWindowsの - - perl windows configuration PerlのWindowsの構成 - - download perl exe ダウンロードPerlのエグゼ - - download perl Windows XP PerlのWindows XPのダウンロード - - configure perl apache2 Perlのapache2の設定 - - enable cgi on apache 有効にするapache上のCGI - - xampp perl configure XAMPPのPerlの構成 - - free perl download for Windows XP PerlのWindows XPの無料ダウンロード - - "perl for vista" " Perlのfor Vistaは" - - how to install perl on xp XP用のPerlをインストールする方法について - - perl windows install PerlのWindowsのインストール - - How to Configure Perl in Windows WindowsでPerlのを構成する方法について - - xampp enable cgi CGIのXAMPPを有効にする - - apache2 cgi configuration apache2のCGIの設定 - - perl download windows xp PerlのダウンロードWindows XP - - perl configure Perlの構成 - - perl interpreter windows vista Windows VistaのPerlのインタープリタ - - configure cgi apache2 apache2のCGIの設定 - -