Gossamer Forum
Home : Products : DBMan : Installation :

Internal Server Error (over night)

Quote Reply
Internal Server Error (over night)
Hi

I am new to this forum and to cgi and perl. I installed DBMan and Links on my server yesterday evening and after some work I got both to work and had even modified html.pl to suit my needs.

The strange thing is that when I try to go to the site today I get the Internal Server Error.



Do gremlins work by night?



Any ideas anyone?



Charlotte
Quote Reply
Re: [ckorsnes] Internal Server Error (over night) In reply to
Hi, This maybe caused by your mods. Did you check to if there is something wrong somewhere by perl -c filename.cgi?

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Internal Server Error (over night) In reply to
Like I said, I am new to both cgi and perl. I'm not sure I understand your question.



C
Quote Reply
Re: [tandat] Internal Server Error (over night) In reply to
I tried to look a bit more into what could be obviously wrong, and found in the faq of my hosting provider the following:



Perl:
Location - /usr/bin/perl

Perl is version 5.0, the top of your perl scripts should be:
#!/usr/bin/perl



First I altered the perl location in my scripts, then I noticed that DBMan requires a minimum of Perl 5.003. Could this be the cause? If so, why would it work the first evening and not the next day?



Charlotte
Quote Reply
Re: [ckorsnes] Internal Server Error (over night) In reply to
Are you able to check your server error logs?

Did you upload the files again after making changes? If so, did you upload in ASCII mode? I doubt it's a problem with the path if you had things working to begin with.

In the FAQ noted below under the section 'Troubleshooting' there is a snippet of code you can add to your files to get more useful error messages.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Internal Server Error (over night) In reply to
No, I am not able to check the server error logs (I think)

I made several changes to html.pl after I got the script to work. I was even able to add items to the database. After installing DBMan I installed Links and got that to work too. I am certain I have uploaded the files in ASCII mode.

I checked out the Trobleshooting and added the error.txt snippet. Unfortunately the error.txt remains empty.

Thanks for your effort. I guess I may have to start all over, although I'm not sure what good that will do :)



C
Quote Reply
Re: [ckorsnes] Internal Server Error (over night) In reply to
If you are willing in your db.cgi file try replacing the following sub with this one.

Also in your .cfg file move your $db_debug = 0; line up above the section that starts with:

# File and URL's

then turn debugging on and see if you get any error messages. The default setup will not show errors within the .cfg file, but making the changes above will. Also I noticed for others they weren't getting all the error messages with the default cgierr sub.

sub cgierr {
# --------------------------------------------------------
# Displays any errors and prints out FORM and ENVIRONMENT information. Useful for debugging.

if (!$html_headers_printed) {
print "Content-type: text/html\n\n";
$html_headers_printed = 1;
}

print "<PRE>\n\nCGI ERROR\n==========================================\n";
$_[0] and print "Error Message : $_[0]\n";

if ($db_debug) { #### added this line #######

$0 and print "Script Location : $0\n";
$] and print "Perl Version : $]\n";
$db_setup and print "Setup File : $db_setup.cfg\n";
$db_userid and print "User ID : $db_userid\n";
$db_uid and print "Session ID : $db_uid\n";

print "\nForm Variables\n-------------------------------------------\n";
foreach $key (sort keys %in) {
my $space = " " x (20 - length($key));
print "$key$space: $in{$key}\n";
}
print "\nEnvironment Variables\n-------------------------------------------\n";
foreach $env (sort keys %ENV) {
my $space = " " x (20 - length($env));
print "$env$space: $ENV{$env}\n";
}
print "\n</PRE>";
####### new lines ###########
}
else {
#This links to your e-mail if someone receive a link to this page
print "\n\nPlease e-mail the <A HREF=\"mailto: $admin_email\">Webmaster</a> and report the error stated.";
}
##### end new lines ###########
exit -1;
}

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Internal Server Error (over night) In reply to
Thanks for the effort, still no change.

C
Quote Reply
Re: [ckorsnes] Internal Server Error (over night) In reply to
What host provider are you using?
What modifications did you make to the script.

If you make a .txt copy of your .cfg, html.pl and db.cgi files, and post the url to where they can be viewed we will check them out and see if we can spot anything.

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Internal Server Error (over night) In reply to
My provider is prohosting.com

The textfiles can be found at

http://snow.prohosting.com/ckorsnes/dbcgi.txt

http://snow.prohosting.com/ckorsnes/htmlpl.txt

http://snow.prohosting.com/...snes/default.dfg.txt

Charlotte

Last edited by:

ckorsnes: Apr 9, 2002, 2:41 AM
Quote Reply
Re: [ckorsnes] Internal Server Error (over night) In reply to
Hi,

I can't get the default.cfg and html.pl file. but i can see an error at line3 in the db.cgi file
Can you change it the same line below?

'>error.txt'

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Internal Server Error (over night) In reply to
The error snippet should include the path to your error.txt file.

For prohosting it would look something like this:

BEGIN {
open (STDERR, ">/usr/home1/ckorsnes/html/error.txt");
}

Not positive on the home1 as it might be different for the 'snow' server.

Also in your db.cgi file you shouldn't have to set this path:

$db_script_path = "http://snow.prohosting.com/ckorsnes/dbman";

Just leave it set to:

$db_script_path = ".";


Looking at your html.pl file it looks like your HTML coding could be causing you problems:

In sub html_record you have:

<table border=2 width="95%"><tr><td>
<TABLE WIDTH="100%" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ID:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'ID'}</Font></TD></TR>
........

</TABLE>
<td width=300>
<img src="$rec{'URL'}" width=300 height=200></table>

You are missing some table tags. Perhaps after your closing table tag you should use:

</TD><td width=300><img src="$rec{'URL'}" width=300 height=200></TD></TR>
</table>

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Internal Server Error (over night) In reply to
Thank you very much, it's up and running. Now I just need to get the links script working, I guess I'll need to post a new message in the links forum.

Charlotte