469,271 Members | 1,740 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

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\Apache2.2\cgi-bin did not work. Could you pls tell me correct steps to install the same?

Regards,
Pavan
Nov 20 '08 #1
7 4555
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!

===========================
========MINIMATRIX==========
===========================
Nov 20 '08 #2
KevinADC
4,059 Expert 2GB
But the code which i wrote in C:\AppServ\Apache2.2\cgi-bin did not work
You made a mistake, thats why it does not work.
Nov 20 '08 #3
Icecrack
174 Expert 100+
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?
Nov 20 '08 #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?
[quote]
hi thanks for your reply. firstly the error on the browser is :
1) Internal Server Error

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

2) Last five lines of my log line are as under:
Expand|Select|Wrap|Line Numbers
  1. [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
  2. [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
  3. [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
  4. [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
  5. [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
  6. [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
  7. [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
  8. [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:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. print "Content-type:text/html\n\n";
  3. print "hello world";
Could u please tell me why i got that error and could u please help me?

Regards,
pavan
Nov 21 '08 #5
KevinADC
4,059 Expert 2GB
change the shebang line to:

Expand|Select|Wrap|Line Numbers
  1. #!c:/perl/bin/perl.exe
or if perl is in the command path:

Expand|Select|Wrap|Line Numbers
  1. #!perl
Nov 21 '08 #6
change the shebang line to:

Expand|Select|Wrap|Line Numbers
  1. #!c:/perl/bin/perl.exe
or if perl is in the command path:

Expand|Select|Wrap|Line Numbers
  1. #!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
Nov 21 '08 #7
@KevinADC This worked for me too!
Feb 24 '13 #8

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Babu | last post: by
reply views Thread by vbhelpski | last post: by
3 posts views Thread by baskar2007 | last post: by
3 posts views Thread by autodidact | last post: by
2 posts views Thread by theschaef | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.