Author Topic: Tech-tip : Error 500 Internal Server Error  (Read 3316 times)

0 Members and 1 Guest are viewing this topic.

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Tech-tip : Error 500 Internal Server Error
« on: July 13, 2006, 11:07:16 AM »
This means that the server is unable to run the script, either by an error in the script, or because of the way it was installed.  There are some common causes that need checking first:

  • The Path to Perl or CHMOD of your file or directory may be wrong
  • Your server may not like the CHMOD setting so ask your host what you should be using.
  • Check you did not open the script with anything other than a pure text editor.
  • If you have access to the server logs, check them for more info.
  • Make sure you saved your script and eventually database in unix format.
  • Also try putting the code below directly after your Path to Perl this will stop and report the script error in more detail.

    #!/usr/bin/perl
    use CGI::Carp qw(fatalsToBrowser);

    If this piece of code does not give you more information on the problem, then the server does not even start the script, so then chmod or path to perl are the most common causes.

I hope this little checklist helps  ;)

Offline MikeRG

  • Newbie
  • *
  • Posts: 2
Re: Tech-tip : Error 500 Internal Server Error
« Reply #1 on: December 03, 2006, 03:23:51 PM »
I had this exact problem following the setting up of a new subdomain.
It's on a Linux server where all directories and files are stored in an HTDOCS directory, including the cgi-bin.
Although I checked CHMOD settings for CGI-Bin and all relevant files, I never dreamed to check the HTDOCS directory.

After 4 technical support attempts with my host and being told that I must have the script set up incorrectly, I found that the HTDOCS directory had been set incorrectly to CHMOD 705.

After setting HTDOCS to CHMOD 777 every thing runs perfectly..

So..
 ;) Don't forget to check CHMOD on all CGI-BIN parent directories also. :)

Offline thepcpro

  • Newbie
  • *
  • Posts: 5
Re: Tech-tip : Error 500 Internal Server Error
« Reply #2 on: November 03, 2007, 12:35:08 PM »

#!/usr/bin/perl

##########################################################
# CSVwrite 28/Okt/2006
# 1999-2003 EZscripting.com
# Script by Alexandre Golovkine & Babelnotes.be
##########################################################
my $base_file = '/home/thepcpro/public_html/ezscripts/database.txt';
my $HTML_thankyou  = 'http://ezscripts.thepcprofessor.ca/thankyou.htm';
my $line_break               = '';
my $ID_autoincrement         = 1;
my $ID_autoincrement_name    = "ID";

please help me get one running and I will pay so I can see what is going wrong, can you sen a copy of cvswrite.pl

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Tech-tip : Error 500 Internal Server Error
« Reply #3 on: November 03, 2007, 01:37:05 PM »
You do not have to pay.  What does the "FatalsToBrowser" line yield?

Offline Jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 1018
    • slipdex
Re: Tech-tip : Error 500 Internal Server Error
« Reply #4 on: November 03, 2007, 01:43:36 PM »
just taking a quick stab here, but are you sure your path to the DB is correct.  I see that you have it set up on a subdomain, and by the look of your path, it would appear at first glance that the url the path points to is http://thepcprofessor.ca/ezscripts/database.txt rather than http://ezscripts.thepcprofessor.com/database.txt.  Might want to look at that one a bit closer, especially if the fatalstobrowser line does not yield results.

Jason
Founder of www.slipdex.com

Offline thepcpro

  • Newbie
  • *
  • Posts: 5
Re: Tech-tip : Error 500 Internal Server Error
« Reply #5 on: November 03, 2007, 03:20:11 PM »
for some reason  I got to qrite work, but now having probs with read and search. Is the template.htm supposed to be in the cgi-bin?

my $base_file                = '/home/thepcpro/public_html/ezscripts/database.txt';
my $HTML_thankyou            = 'template.htm';
my $line_break               = '<br>';
my $ID_autoincrement         = 1;
my $ID_autoincrement_name    = "ID";

Offline thepcpro

  • Newbie
  • *
  • Posts: 5
Re: Tech-tip : Error 500 Internal Server Error
« Reply #6 on: November 03, 2007, 03:34:47 PM »
I get [2007-11-03 20:59:46]: error: file is writable by others: (/home/thepcpro/public_html/ezscripts/cgi-bin/template.htm) over and over no matter what chmod

Offline thepcpro

  • Newbie
  • *
  • Posts: 5
Re: Tech-tip : Error 500 Internal Server Error
« Reply #7 on: November 03, 2007, 04:43:53 PM »
I don't know perl at all, this frustrating - read/search

my $base_file                = '/home/thepcpro/public_html/ezscripts/database.txt';
my $HTML_thankyou            = '/cgi-bin/template.htm';
my $line_break               = '<br>';

my $ID_autoincrement         = 1;
my $ID_autoincrement_name    = "ID";

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: Tech-tip : Error 500 Internal Server Error
« Reply #8 on: November 03, 2007, 11:47:47 PM »
Quote
for some reason  I got to qrite work, but now having probs with read and search. Is the template.htm supposed to be in the cgi-bin?

What error do you get with csvread?  And yes, normally the template.htm can be in the cgi-bin directory.