Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Perl CGI help

Expand Messages
  • Ken Shail
    ... From: John Baker ; John Baker To: perl-beginner@yahoogroups.com Sent: Thursday, December 29, 2005 10:36 AM Subject: [PBML] Perl CGI help I am new to this
    Message 1 of 1 , Dec 29, 2005
      ----- Original Message -----
      From: John Baker ; John Baker
      To: perl-beginner@yahoogroups.com
      Sent: Thursday, December 29, 2005 10:36 AM
      Subject: [PBML] Perl CGI help


      I am new to this group as of last night. In fact, I'm new to Perl in
      general. I run a webserver from my computer using apache, and I have
      ActivePerl installed under a Windows XP enviroment.
      Here is my problem.
      when I try to run a perl script from my site, Apache reports an
      "Internal Server Error". After hours of Googling, I found this could mean a
      million different things, so I started to eliminate them one by one. I
      think I've narrowed it down to being a faulty script. I also think it has
      something to do with the first line of code.
      Here is my code (basic "hello, world!"):

      #!/usr/bin/perl -wT
      print "Content-type: text/html\n\n";
      print "Hello, world!\n";

      The filename is first.cgi. Infact, it is located at
      www.johnsrobotics.com/cgi-bin/first.cgi

      I have checked syntax from a command line, and Perl says it is "ok".
      My ActivePerl is installed at C:/Perl. Does this have anything to do with
      it? Am I completely headed in the wrong direction?
      Any help is greatly appreciated.

      Thank you,
      John Baker

      Assuming that your script above is all that the page contains, have you
      tried adding <head> </head> <body> and </body> in the appropriate places ?
    Your message has been successfully submitted and would be delivered to recipients shortly.