By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,708 Members | 2,080 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,708 IT Pros & Developers. It's quick & easy.

Doubt in installing CGI perl

P: 51
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
Share this Question
Share on Google+
7 Replies


P: 5
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
Expert 2.5K+
P: 4,059
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
Expert 100+
P: 174
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

P: 51
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
Expert 2.5K+
P: 4,059
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

P: 51
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

P: 1
@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.