Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I can't run PERL file from IE. Need your HELP!!!

Status
Not open for further replies.

nati

Programmer
Nov 29, 2001
6
CA
When I'm tring to open it I'm recieving a message if I want to download this file or to open it . And if I'm opening it - it immediately disappears. What to do? I'm not working with PERL yet, but I need it in my new job project. SO HELP ASAP, please.
 
I'm not sure what you're trying to do? You can't run a perl script in IE, or any other browser for that matter. You can only run perl scripts with perl. Go to for more general information.
 
I'm trying to run simple PERL CGI script.
#C:\Perl-bin\perl
print "Content-type: text/html\r\n\r\n";
print "Hello, World.";
Then I'm writing in browser This example is in documentation.
But it gives me Server Error:
[error] [client 127.0.0.1] Premature end of script headers: c:/program files/apache group/apache/cgi-bin/pt1.pl
[Thu Nov 29 14:30:05 2001] [error] [client 127.0.0.1] File does not exist: c:/program files/apache group/apache/htdocs/client/ate/ad-handler/0,,clspl_ca,00.htm
[Thu Nov 29 14:31:05 2001] [error] [client 127.0.0.1] File does not exist: c:/program files/apache group/apache/htdocs/client/ate/ad-handler/0,,
etc.

What does it mean? Thanks
 
I don't use perl on windows, but I'll give it a shot.
First of all the script should look like this:

#!C:\Perl-bin\perl
print "Content-type: text/html\r\n\r\n";
print "Hello, World.";
 
Hey there,
I don't use apache but....it sounds like the server can't associate the perl file with the perl interpreter.
That means it isn't understanding that for a perl script it needs to execute it rather than offer it to download.

I think in apache, (and I'm sure someone can correct me if i'm wrong) there is a config file that you need to ensure has 2 things, a script alias (to tell apache to treat everything in the cgi-bin as a cgi app), and also a mapping to tell apache to treat things that end in .pl or .cgi as perl scripts. This config file is the default httpd.conf

The 'mapping' should also be in your main config file and is something like;-

AddHandler cgi-script cgi pl

.....

All the above info came from the following file;-

Apache\htdocs\manual\howto\cgi.html

which is in the install folder of Apache.

And I would check it yourself, because as i mentioned I don't use Apache much.

HTH

Jez

:)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top