Jeff,

The issue is resolved. 

On executing the perl file from shell it gave the error
./printenv.pl: print: command not found
./printenv.pl: line 8: syntax error near unexpected token `(s'
./printenv.pl: line 8: `foreach $var (sort(keys(%ENV))) {'

Then I copied the file printenv from cgi-bin to htdcos/cgi and it worked fine. It 
seems there were some unexpected characters in my perl file. The perl files I have got 
from my HP box using ftp.

Thanks for you help...

Regards,
> Rahul Kohli

-----Original Message-----
From: Jeff Trawick [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 21, 2003 6:08 PM
To: [EMAIL PROTECTED]
Subject: Re: "Internal Server Error" on accessing Perl file with Apache
2.0.43 - Linux 7.2


Rahul Kohli wrote:
> Now on access the perl file usiing my browser 
> http://servername.domain:port/cgi/printenv.pl
> The browser display the "Internal Server Error" page. 
> 
> On checking the error_log of apache I could see the line 
> "premature end of script headers". 
> 
> The perl file contain the correct path of perl and has permissions on the files are 
> also correct.

But this is a classic permissions problem.  Does the web server user id 
have read/execute permission for the script?

Exactly what are the permissions?

What happens when you run printenv.pl from the shell?

Reply via email to