LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2008, 01:30 AM   #1
deepak rao
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
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...
 
Old 12-02-2008, 01:48 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,824

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
500 Internal Server Error shahz Red Hat 9 03-31-2009 03:05 AM
Apache Returning an Internal Server Error (500) ada-guy Linux - Server 2 09-29-2008 07:13 PM
500 Internal Server Error in apache av.dubey Linux - Server 16 01-01-2008 12:32 PM
500 Internal Server Error bship Linux - Software 5 01-19-2007 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration