Doubt in installing CGI perl

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pavanponnapalli
    New Member
    • May 2008
    • 51

    Doubt in installing CGI perl

    hi,
    I have installed CGI perl following the link as under:
    http://www.ricocheting .com/server/cgi.html. I have also followed another website which has given me the same steps. But the code which i wrote
    in C:\AppServ\Apac he2.2\cgi-bin did not work. Could you pls tell me correct steps to install the same?

    Regards,
    Pavan
  • minimatrix
    New Member
    • Nov 2008
    • 5

    #2
    Hi I'd like to help you but first things first:

    1) Do you know the location of your Perl exe files?
    2) have you added Perl to the PATH environment variable?

    if so use CMD and type: ppm

    this is the 'Perl Package Management'.

    from here type : install CGI

    once it has installed type : quit

    and then navigate to where your script is and try to run it ..

    I hope this has helped!

    =============== ============
    ========MINIMAT RIX==========
    =============== ============

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      But the code which i wrote in C:\AppServ\Apac he2.2\cgi-bin did not work
      You made a mistake, thats why it does not work.

      Comment

      • Icecrack
        Recognized Expert New Member
        • Sep 2008
        • 174

        #4
        First off what happens when you try to run your code (What error messages do you get)?

        second could you post the last 5 lines of your apache log?

        third could you post the code your trying to run?

        Comment

        • pavanponnapalli
          New Member
          • May 2008
          • 51

          #5
          Originally posted by Icecrack
          First off what happens when you try to run your code (What error messages do you get)?

          second could you post the last 5 lines of your apache log?

          third could you post the code your trying to run?
          [Quote]
          hi thanks for your reply. firstly the error on the browser is :
          1) Internal Server Error

          The server encountered an internal error or misconfiguratio n and was unable to complete your request.

          2) Last five lines of my log line are as under:
          Code:
          [Fri Nov 21 11:34:32 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't create child process: 720003: hello.cgi
          [Fri Nov 21 11:34:32 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't spawn child process: C:/AppServ/www/cgi-bin/hello.cgi
          [Fri Nov 21 11:34:35 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't create child process: 720003: hello.cgi
          [Fri Nov 21 11:34:35 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't spawn child process: C:/AppServ/www/cgi-bin/hello.cgi
          [Fri Nov 21 11:37:54 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't create child process: 720003: hello.cgi
          [Fri Nov 21 11:37:54 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't spawn child process: C:/AppServ/www/cgi-bin/hello.cgi
          [Fri Nov 21 11:38:05 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't create child process: 720003: hello.cgi
          [Fri Nov 21 11:38:05 2008] [error] [client 127.0.0.1] (OS 3)The system cannot find the path specified.  : couldn't spawn child process: C:/AppServ/www/cgi-bin/hello.cgi
          3) The code i was trying to run is as under:

          Code:
          #!/usr/bin/perl
          print "Content-type:text/html\n\n";
          print "hello world";
          Could u please tell me why i got that error and could u please help me?

          Regards,
          pavan
          Last edited by eWish; Nov 21 '08, 02:07 PM. Reason: Please use code tags

          Comment

          • KevinADC
            Recognized Expert Specialist
            • Jan 2007
            • 4092

            #6
            change the shebang line to:

            Code:
            #!c:/perl/bin/perl.exe
            or if perl is in the command path:

            Code:
            #!perl

            Comment

            • pavanponnapalli
              New Member
              • May 2008
              • 51

              #7
              Originally posted by KevinADC
              change the shebang line to:

              Code:
              #!c:/perl/bin/perl.exe
              or if perl is in the command path:

              Code:
              #!perl
              hi friend,
              Thanks a lot. My perl.exe file is in D:/ and i have changed accordingly.
              It has worked. Once again thank u.

              cheers,
              Pavan

              Comment

              • orbitingeden
                New Member
                • Feb 2013
                • 1

                #8
                @KevinADC This worked for me too!

                Comment

                Working...