Install, Setup and Configure CGI and Perl in Windows XP 설치, 설치 및 구성 Windows XP에서 CGI와 펄을

Prerequisite 전제 조건

Obvioulsy, a web server needs to be running on the Windows machine. Obvioulsy, 웹 서버는 윈도우 머신에서 실행해야합니다. Refer to this 참조이에 post 게시물 for instructions on how to install Apache2 in Windows. Windows에 Apache2를 설치하는 방법에 대한 지침.

Download ActivePerl 다운로드 ActivePerl

Download ActivePerl from ActivePerl에서 다운로드 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 ActivePerl을 설치

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. 펄 CGI 프로그램을 사용하면되며 원하는 두 리눅스 기계와 기계 사이에 윈도우 이동성의 수준을 유지하기 위해 일부로 대부분의 리눅스 시스템에있다, 당신은 윈도우 머신에 동일한 위치에 펄을 설치할 수있습니다.

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 . 예를 들어, 리눅스 시스템에서, 펄에 위치한는 / usr / 빈 / 그래서 난 #!는 / usr / 빈과 함께 쓰기 시작 모든 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. 그래서, 최고의 윈도우 머신에 펄을 설치할 때, 대신 기본 위치에 \ 펄), C로 설치 : \ usr 대신에, 그래서는 Perl 실행에 위치한는 / usr (예에 C : 그것을 설치 / 빈 / 펄. This allows codes written on Windows machine been moved to, without changes, to Linux machine, and have it run there, and vice versa. 이 코드는 윈도우 머신에 서면있게하려면, 변경하지 않고, 리눅스, 기계, 이동되었습니다 그리고 저기, 그리고 그 반대로 실행해야합니다.

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 PATH 환경 변수를 Perl에 추가
Create Perl file extension association 펄 확장 파일을 만듭니다 협회

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 파일 열기> 프로그램 -> 아파치 HTTP 서버> 구성 아파치 서버> 아파치 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를합니다. 와줘, 또는 추가할 수있습니다. 뒤에 와줘. cgi를 선호하는 경우도 CGI 파일은 Perl 공개로) 예를 들어 처리됩니다 :

#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 설정 파일을 저장합니다. 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: 경우 (ScriptAlias 대개 Apache2/cgi-bin입니다 ScriptAliased 디렉터리 외부 CGI를 사용하고자 /), 다음 줄을 주석 :

ScriptAlias /cgi-bin/ “C:/Program Files/Apache Group/Apache2/cgi-bin/” ScriptAlias이 / cgi - bin / "에서 C : /의 Program Files / 아파치 Group/Apache2/cgi-bin /"

Should look like: 같은 모양입니다 :

#ScriptAlias /cgi-bin/ “C:/Program Files/Apache Group/Apache2/cgi-bin/” # ScriptAlias이 / cgi - bin / "에서 C : /의 Program Files / 아파치 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. 또한, 만약 귀하의 모든 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. 아파치 서버를 다시 시작합니다.

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 경우, 시작에 갈 설치되어 있는지 잘 모르겠어요 -> 검색 및 perl.exe를 검색할 수있습니다. This location is the path to the perl executable that has to be put on the top of all cgi scripts. 이 위치에 대한 경로되는 모든 CGI 스크립트의 실행 펄 위에 뿌리는 것입니다. If you follow default installation procedure, the path should be C:/perl/bin/perl.exe 경우 기본 설치 절차에 따라해야한다 경로는 C : / / 빈 / 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 / 빈 / 펄
#!/perl/bin/perl.exe #! /은 Perl / 빈 / perl.exe
#!/perl/bin/perl #! /은 Perl / 빈 / 펄

Testing Your Web Server CGI Configuration 테스트를하여 웹 서버를 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 라인의 구성에 따라 다름)과 첫 번째 라인을 수정하는대로 ActivePerl 통역을 가리킨 데 필요한 :

#!c:\perl\bin\perl.exe #!에 c : \ perl을 \ 빈 \ perl.exe
# ^^^ this must be the first line of the script! # ^ ^ ^이 스크립트의 첫 줄에 있어야합니다! ^^^ ^ ^ ^
# start code # 시작 코드

use strict; 엄격한 사용;
use CGI; CGI를 사용;
my $q = new CGI; 내 $에서 q = 새로운 CGI를;

# print header and start the markup output # 인쇄 헤더와 마크업 출력 시작

print $q->header( “text/html” ),$q->start_html( “hello from perl cgi!” ); $ q를 인쇄 -> 헤더 ( "text / html은"), $는 q -> start_html ( "안부에서 펄 CGI를!");
print $q->h2(”hello dave…”); $ q를 인쇄 -> H2를 ( "안녕하세요 데이브 ...");
print $q->end_html; $ q를 인쇄 -> end_html;
# end code # end 코드

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 내 디지털 생활 포럼 .



7 Responses to “Install, Setup and Configure CGI and Perl in Windows XP” 7 응답을 "설치, 설치 및 구성, CGI와 펄을 Windows XP에서"

  1. Install AWStats- Free Logfile Analyzer for Site Statistics » My Digital Life AWStats - 무료 로그 파일 분석기를 설치하는 사이트 통계»내 디지털 생활을위한
    January 2nd, 2006 02:19 2006년 1월 2일 2시 19분
    1

    [...] As AWStats is Perl based, a Perl Interpreter need to be installed first to take anvantage of AWStats. AWStats를 기반으로 펄 [...], 통역 Perl에 처음으로 설치되도록 AWStats의 anvantage 취할 필요가있다. For instruction on how to install Perl in Windows machine, check out this article. 윈도우 머신에 설치하는 방법은 Perl에 관한 지침은이 문서 체크 아웃. [...]

  2. Besart
    July 25th, 2006 20:53 7 월 25 일 2006 20시 53분
    2

    I have installed cgi and configured apache as you said, but i got this erro: 네가 말했듯이 난 CGI와 아파치가 설치되어 구성된하지만 난이 erro 있어요 :

    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. 제발 서버 관리자는 로컬 @ 웹마 스터에게 문의하고 오류 발생의 시간을 그들을 알리는, 그리고 당신은 오류가 발생했을 수도 아무것도 할 수있습니다.

    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 Server를 로컬 포트 80시

  3. jack
    May 10th, 2007 19:25 5 월 10 일 2007 19:25
    3

    Cool4you,guys. Cool4you, 얘들아.

  4. Mitchell 미첼
    June 20th, 2007 08:09 6 월 20 일 2007 8시 9분
    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 아마 파이어 폭스의 텍스트 또는 뭔가를 표시하지만, 인용 부호를 혼합하는 단순한 문제는, 그래서 그 문제로 이어질 수있다 :)

  5. Johanna 요한나
    October 8th, 2007 23:05 10 월 8 일 2007 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 무니르
    November 28th, 2007 22:14 11 월 28 일 2007 22:14
    6

    I did everything you said. 그 말 다 했어. But cgi is still not running. 하지만 CGI는 아직 실행되지 않고있습니다. Please help. 제발 도와주세요.
    my apache is 2.2 내 아파치 2.2입니다

  7. gael 게일
    September 30th, 2008 23:42 9 월 30 일 2008 23시 42분
    7

    Thanks a lot ! 고맙구나!

    BTW, the error 5OO is thrown by the server if the quotes are not replaced by standard one line 11… BTW, 서버의 경우 오류가 5OO 따옴표 표준을 한 줄에 11 시까지 대체되지 않습니다 의해 throw됩니다 ...

    Otherwise everythings works fine. 그렇지 않으면 제대로 작동 everythings.

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> 이러한 태그 : title="">은 <a href="" 사용할 수있습니다 <abbr title=""> <acronym title="">의 <b> <blockquote cite=""> <cite>의 <code> <밤 날짜 = "">은 <em>가 <i> <q cite=""> <strike>의 <strong>

Subscribe without commenting 코멘트를 구독하지 않고


Custom Search

New Articles 새 문서

Incoming Search Terms for the Article 에 대한 검색 약관받는 제

download perl.exe 다운로드 perl.exe - - install perl on windows xp 창문에 XP를 perl을 install - - Perl.exe download Perl.exe 다운로드 - - perl.exe perl.exe - - apache2 enable cgi Apache2 활성화를 CGI - - perl apache2 펄 Apache2 - - perl for windows XP Windows 용 perl을 XP에서 - - perl vista 펄 비스타 - - enable cgi apache2 cgi를 Apache2 활성화 - - install perl on vista 비스타에 perl을 install - - how to install perl on windows XP 윈도우 XP를 설치하는 방법에 펄 - - configure perl 펄 구성 - - perl setup download perl을 설치 다운로드 - - install perl xp 펄 XP를 설치 - - download perl for windows xp 윈도우 XP를 다운로드 펄 - - PERL for windows vista PERL을 윈도우 비스타 - - perl download for windows xp 윈도우 XP에서 perl을 다운로드 - - XAMPP Perl CGI 펄 CGI를 XAMPP - - xampp path to perl 경로 xampp 펄로 - - download perl setup perl을 다운로드하여 설치 - - perl windows vista 펄 윈도우 비스타 - - install perl vista 펄 Vista를 설치 - - xampp perl path xampp 펄 경로 - - free download perl.exe 무료 다운로드 perl.exe - - perl download xp perl을 다운로드 XP에서 - - apache2 perl Apache2 펄 - - apache2 cgi enable cgi를 활성화 Apache2 - - configure cgi 구성도 cgi - - how to configure perl perl을하도록 구성하는 방법 - - free download perl interpreter 무료 다운로드 펄 인터프리터 - - INSTALL PERL FOR WINDOWS XP perl을 설치할 Windows XP 용 - - apache2 configure cgi Apache2 구성도 cgi - - Perl interpreter for windows XP 윈도우 XP에서 펄 인터프리터 - - all 모두 - - how to install perl on vista 비스타에 perl을 설치하는 방법 - - perl interpreter free download 펄 통역을 무료로 다운로드 - - perl for xp XP 용 펄 - - install perl windows xp 펄 Windows XP를 설치 - - perl interpreter vista 펄 인터프리터 비스타 - - windows xp cgi 창문도 cgi XP에서 - - how to install perl in windows xp perl을 Windows XP에서 설치하는 방법 - - perl download for xp XP 용 perl을 다운로드 - - apache perl configuration 아파치 perl을 구성 - - perl.exe free download perl.exe 무료 다운로드 - - install perl on xp XP에서 perl을 install - - how to configure cgi CGI를 구성하는 방법을 - - perl exe download perl을 exe를 다운로드 - - perl setup perl을 설치 - - enable cgi in apache2 Apache2를 CGI에서 활성화 - - apache2 allow cgi Apache2 cgi를 허용 - - Free Download Perl for Windows XP 무료로 다운로드 Windows XP 용 펄 - - perl interpreter for vista Vista 용 펄 인터프리터 - - perl for windows XP download Windows 용 perl을 다운로드 XP에서 - - apache2 perl setup Apache2 perl을 설치 - - apache2 configure perl Apache2 구성 펄 - - how to install perl on windows vista 윈도우 비스타를 설치하는 방법에 펄 - - Perl Windows XP 펄 윈도우 XP - - perl setup for windows Windows 용 perl을 설치 - - perl windows configuration 펄 Windows 구성 - - download perl exe exe를 다운로드 펄 - - download perl Windows XP 펄 다운로드 Windows XP의 - - configure perl apache2 perl을 Apache2 구성 - - enable cgi on apache 아파치에 cgi를 활성화 - - xampp perl configure perl을 구성 xampp - - free perl download for Windows XP Windows XP 용 무료 perl을 다운로드 - - "perl for vista" "비스타"펄 - - how to install perl on xp XP에서 perl을 설치하는 방법 - - perl windows install 펄 창문을 설치 - - How to Configure Perl in Windows 펄 윈도우를 구성하는 방법에 - - xampp enable cgi xampp 활성화를 CGI - - apache2 cgi configuration Apache2 cgi를 구성 - - perl download windows xp perl을 다운로드 Windows XP의 - - perl configure 펄 구성 - - perl interpreter windows vista 펄 인터프리터는 Windows Vista - - configure cgi apache2 구성도 cgi Apache2 - -