Hi! My best wishes for all of you!
 I have what I consider a simple question about Apache and Perl.
  ¿How do I get my Hello World script to run into my browser?
 
Maybe my config is not good; so here's the procedure I followed:
 1- I installed "apache_1.3.20-win32.msi" (Apache Ver 1.3 Win32) into the dir: "c:\Apache\"
 2-Because I´m in a single machine (No LAN, No Domain) I configured the "httpd.conf" as follows:
    -I put absolute paths in the first section (Like "C:/Apache/")
    -I put "Server Name:127.0.0.1" (Cause I´m not in a Network so it´s suppose to be the localhost)
    -I check the config with "apache.exe -t" and The Sintax were OK.
  3-I install "ActivePerl-5.6.1.631.msi" in "C:\Apache\Perl" and then tested in the command line with:
      C:\Apache\Perl\eg\>perl example.pl
      And it printed correctly the "Hello World" FROM THE MSDOS WINDOW (So the paths are OK)
  4-Then I modified again my "httpd.conf" as follows:
         AddHandler cgi-script .pl
         ScriptAlias /cgi-bin/ "C:/Apache/cgi-bin/"
 
      Then I checked sintax with NO PROBLEMS.
  5-At last, I create a test file in "C:\Apache\cgi-bin\" and named "HelloCGI.pl" with the content:
        #!C:\Apache\Perl\bin\perl.exe
        use CGI qw(:standard) ;
        print header();
        print "Hello, world";
   6-But when I try to open it with IExplorer 5.5, IT LAUNCHES THE MSDOS WINDOW, prints the HTML header and the
      "Hello World" string in the MSDOS Window and then closes. BUT IT NEVER PUT "Hello World" In my browser.
   7- I try it also with the pop-up window over "HelloCGI.pl" and choosing "Open with... IExplorer" But it try to DOWNLOAD
       the file instead of open it.
   8- At last, I change my script with the example of the Apache GCI Documentation:
        #!/usr/bin/perl
        print "Content-type: text/html\r\n\r\n";
        print "Hello, World.";
     Nothing happend! It also works fine only in the command line window.
 NOTE: After installing Perl and Apache, I restarted my system, I verified the paths and in all the procedure the Apache server was running.
   SO, PLEASE help me!!!!!

Reply via email to