internal 500 server error

They have: 314 posts

Joined: Nov 1999

I've noticed that all my problems on the web seem to evolve from cgi and perl and my latest headache is following on that trend.I have just downloaded Account mannager lite from cgi.elitehost.com and tried to set it up on my free virtualave account.I've set it up correctly (or atleast I am pretty sure I have) and have uploaded them to my cgi-bin. This is where my problems start. The instructions are paticually vague when it comes to telling me what the file permissions should be for the .pl files. I have tied 755 and 777 but these always bring the the Internal server 500 error. I'm still new to perl and am not sure what to do now. Anyone know of a solution?

Thanks

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

They have: 568 posts

Joined: Nov 1999

is the path to perl set right?

They have: 314 posts

Joined: Nov 1999

usr/bin/perl or something like that is what I have used in previous scripts and is what is used in this one, so yes.

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

Justin S's picture

They have: 2,076 posts

Joined: Jun 1999

'Cause that's how they developed perl

------------------
Justin S.

They have: 568 posts

Joined: Nov 1999

well, then double check your paths and check to see if you uploaded the files in ASCII not Binary.

merlin's picture

They have: 410 posts

Joined: Oct 1999

why is this upload in ASCII so important? why binary doesn't do it right?

They have: 314 posts

Joined: Nov 1999

Ok, so I have checked everything. Path to perl is correct, paths are correct and I have uploaded in ASCII not binary but I still get server 500 errors! Anyother things that might be going wrong with it?

Thanks

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

They have: 568 posts

Joined: Nov 1999

ok, i've got 2 possibly solutions

1) if you have telnet access to a machine that has perl on it upload the main .pl or .cgi file and chmod it 755, then type ./script_name.pl you should see a list of errors that occured in the script.

if you dont have telnet access put this line of code after print "Content-type: text/html\n\n";

use CGI::Carp qw(fatalsToBrowser);

that will give you errors that occured in the script too.

2) if the above solutions discovered no errors at all then it's your server. Try http://free.prohosting.com or www.hypermartnet

i hope this helped

They have: 314 posts

Joined: Nov 1999

Ok, thats helped alot but I am still stuck (sob). I have bypassed the internal server 500 error (yay!!) by using the print fatals thing. I sorted one problem (the problem causing the 500 error i think) but now I get this error.

Software error:
Can't find string terminator '"' anywhere before EOF at config.pl line 116.
For help, please send mail to the webmaster ([email protected]), giving this error message and the time and date of the error. ; Content-type: text/html

Software error:
[Thu Feb 3 11:42:05 2000] amadmin.pl: Can't find string terminator '"' anywhere before EOF at config.pl line 116.
For help, please send mail to the webmaster ([email protected]), giving this error message and the time and date of the error. ;

I have no idea what this means.... at all! Any help? Thanks

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

They have: 568 posts

Joined: Nov 1999

you probably need to put a " at the end of line 116 or you missed a ; in a previous line.

They have: 314 posts

Joined: Nov 1999

I have looked at the script and am yet to see anything wrong with it. Line 116 is the very last line out of this:

# Subject of email that is automatically sent to users that you
# chose not to accept in your Account Manager.
$denied_email_subject = "Application Denied";

# Subject for email that is automatically sent to users that you
# chose to accept in your Account Manager.
$approved_email_subject = "Application Approved";

Orpheus, when you say I might have missed a ; on a previous line do you mean ANY previous line or just the one before 116?

Thanks. I will get this script working if it kills me.

------------------
Thomas Minton
The JavaScript Place
Get paid $20 - $160 an hour for viewing adverts

Justin S's picture

They have: 2,076 posts

Joined: Jun 1999

Sorry I don't have the answer, but I just wanted to add a comment: I heard that perl is terrible at trying to guess what line the error is on. That's just something I heard though.

------------------
The fireburn.com Network:

  • fireburn.com [www.fireburn.com]
  • Flame Hosting [www.flamehosting.com]
  • Ineffable Designs [www.ineffabledesigns.com]
  • The Webmasters Portal [www.webmasters-portal.com]
  • They have: 161 posts

    Joined: Dec 1999

    Regarding the difficulty of figuring out what line an error occurs on... Perl "shrinks" a multi-line expression to one line when it compiles your program. So doing:

    code:

    $a = $b +
      $c +
      $d +
      $e;
    [/code]
    
    might elicit a "use of uninitialized value" warning with a line number of the line which ``$a = $b +'' is on, even though the undef value might be in $d.
    
    And if you're missing a " somewhere, Perl usually picks up on it, but if it doesn't, then you should look through your code for typos.  Missing ('s or )'s, {'s or }'s, "s or 's.
    
    Perl is a great language, so deal with it.
    
    ------------------
    -- 
    MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve 

    They have: 568 posts

    Joined: Nov 1999

    Justin: your right about that. Perl could say "error on line 3483" and it would be on line 5. It's terribly annoying.

    As for the 500 server error I can't think of anything else to say. It might help if you gave a URL to the cgi file renamed to .txt

    They have: 161 posts

    Joined: Dec 1999

    One way to help Perl tell you where an error is, is to use the Carp.pm module. Using the carp() and croak() functions will make it report the first line of code that set of the chain of function calls leading to a warning or an error message. It's standard distribution.

    ------------------
    --
    MIDN 4/C PINYAN, NROTCURPI, US Naval Reserve

    They have: 314 posts

    Joined: Nov 1999

    Ok, if anyone wants to know the url to the file (txt) is http://thomasminton.virtualave.net/config.txt

    If anyone can see any errors I would be grateful.

    ------------------
    Thomas Minton
    The JavaScript Place
    Get paid $20 - $160 an hour for viewing adverts

    Justin S's picture

    They have: 2,076 posts

    Joined: Jun 1999

    Just a note to Japhy: Boardzilla is on the brink of dying, and I (we) were wondering if you would mind coming back again Confused

    ------------------
    The fireburn.com Network:

  • fireburn.com [www.fireburn.com]
  • Flame Hosting [www.flamehosting.com]
  • Ineffable Designs [www.ineffabledesigns.com]
  • The Webmasters Portal [www.webmasters-portal.com]
  • Justin S's picture

    They have: 2,076 posts

    Joined: Jun 1999

    I was looking over the file, and the only thing I could see which would cause any confusion is:

    code:

    $passfile = "
    [/code]
    
    ??? I'm probably totally off but...
    
    ------------------
    The fireburn.com Network:
    
  • fireburn.com [www.fireburn.com]
  • Flame Hosting [www.flamehosting.com]
  • Ineffable Designs [www.ineffabledesigns.com]
  • The Webmasters Portal [www.webmasters-portal.com]
  • They have: 568 posts

    Joined: Nov 1999

    thats the line

    change $passfile = "

    to $passfile = "";

    They have: 314 posts

    Joined: Nov 1999

    Great! I finally got the script working apart from one thing which I will be able to work out on my own. Thanks alot!!

    ------------------
    Thomas Minton
    The JavaScript Place
    Get paid $20 - $160 an hour for viewing adverts

    They have: 568 posts

    Joined: Nov 1999

    crisis over

    Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.