LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   internal server error:500 in apache (https://www.linuxquestions.org/questions/linux-newbie-8/internal-server-error-500-in-apache-687645/)

deepak rao 12-02-2008 01:30 AM

internal server error:500 in apache
 
hi.. i am using debian linux. i have installed apache web server but its showing internal server error when i try to execute perl programs..
I have stored the programs in /usr/lib/cgi-bin.. can you just help me out of this..
my program looks like this

#!/usr/bin/perl
use strict;
use CGI':standard';
my $line;
my $count;
open(FH,'<test.txt')or die"can't open";
while($line=<FH>)
{
$count=$line;
}
close(FH);
$count++;
$line=$count;
open(FH,'>test.txt')or die"can't open";
while($count)
{
print FH "$count\n";
$count=0;
}close(FH);

print
header(),
start_html(-bgcolor=>'pink'),
hr(),
br(),
"you are the $line user",
br(),hr(),
end_html();

I have also provided the executable permissions for this...

bathory 12-02-2008 01:48 AM

Looking at apache error_log should give you a hint of what's the reason for the error you get.


All times are GMT -5. The time now is 08:31 PM.