Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

500 Server Error on admin.cgi

Quote Reply
500 Server Error on admin.cgi
Ok, This is the only script I have had problems installing. I set it up in my cgi-bin just like the instructions said. However, when I went and tried to execute the admin.cgi script, I get that really annoying "500 Internal Server Error" message. I have tripple checked all the file permissions, paths, and directories, but the script still will not run. I have installed lots of scripts on my site (intermediate to advanced installation) with no problems. It is on a Unix server, which is hosted by ValueWeb. I have been looking for months for this script and have finally found it. Please help me. Thank you. If you want to ICQ me you may. I am always invisible, so give me a few minutes to answer you.

Shawn Anderson
President and Webmaster
southwest Virtual Airways
http://www.virtualswa.com
Quote Reply
Re: 500 Server Error on admin.cgi In reply to
1) Double check your perl path.
2) Double check the permissions of your database files and .cgi scripts.
3) Double check the paths in the links.cfg file.
4) Make sure that you have included the complete ABSOLUTE path to the links.cfg file in your admin.cgi script:

Code:

require "/absolute/path/to/cgi-bin/links/admin/links.cfg";

5) Turn on debugging in the admin.cgi...look for the following line towards the bottom of the file:

Code:

# &cgierr


Remove the # to see a full bug/error report.

Regards,

Eliot Lee

Quote Reply
Re: 500 Server Error on admin.cgi In reply to
Eliot,
Thanks for the info. I removed the # in front of the &cgierr, and I am still getting a 500 Internal Server error. I put the absolute path in all of the cgi scripts, and checked all the file permissions. Even did file permissions on all the files seperately. Still no luck. On my server, there is no acess to the error log. Any other ideas on what it might be? Here is what the links.cfg file looks like so you can see it.......

# Paths and URL's to Important Stuff
# --------------------------------------------------------
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/u202/birt18/cgi-bin/links/admin";
$db_dir_url = "http://www.virtualswa.com/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://www.virtualswa.com/cgi-bin/links";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/u202/birt18/links/pages";
$build_root_url = "http://www.virtualswa.com/links/pages";

# PATH and URL of What's New page. No Trailing slash.
$build_new_path = "$build_root_path/New";
$build_new_url = "$build_root_url/New";

# PATH and URL of What's Cool page. No Trailing slash.
$build_cool_path = "$build_root_path/Cool";
$build_cool_url = "$build_root_url/Cool";

# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/Ratings";
$build_ratings_url = "$build_root_url/Ratings";

# Database Options
# --------------------------------------------------------
# You really need to use flock(). However if your system doesn't support it (Win95),
# then turn this off at your own risk!
$db_use_flock = 1;
# Use Pragma: no-cache to stop browsers from caching output? (0 = cache, 1 = nocache)
$db_nocache = 1;
# Use IIS headers? Set this to 1 if your web server needs the full headers (HTTP/1.0 etc.)
$db_iis = 1;
# Field number of category in category.db
$db_main_category = 1;
# Referers -- which hosts are allowed to add to your database.
@db_referers = (www.virtualswa.com);

# Email Options
# --------------------------------------------------------
# NOTE: Be sure to edit the text of the message. It can be found
# in the templates directory: email-add.txt, email-del.txt and
# email-mod.txt respectively.

# Set only ONE of either $db_mail_path which should go to a
# mail program like sendmail, or $db_smtp_server which will use
# a SMTP server. Do not set both at once!

# PATH of sendmail. # SMTP Server
$db_mail_path = '/usr/lib/sendmail'; $db_smtp_server = '';

# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'webmaster@virtualswa.com';

# Notify visitors automatically when their links are validated?
$db_email_add = 0;

# Notify visitors automatically when their links are modified?
$db_email_modify = 0;

# Log all outgoing messages? Put the full path to a logfile and make sure it
# exists and is writeable (chmod 666 -rw-rw-rw-). This logfile can get pretty
# big!
$db_mailer_log = '';

# Build Options
# --------------------------------------------------------
# Setting for popular cutoff, can either be a percent (i.e. top 3%), or
# a fixed value (i.e. top 10). Enter 0.03 or 10 respectively.
$db_popular_cutoff = 0.03; # Top 3%
# Number of days a link is considered New.
$db_new_cutoff = 14; # 14 days old.
# Return search results bolded (1 = yes, 0 = no).
$search_bold = 1;
# The name of an index file.
$build_index = "index.html";
# The extension to use for non index files:
$build_extension = ".html";

# Should your add.cgi automatically select what category the user
# is adding his link into?
$db_single_category = 1;

# Directory Permissions. Do NOT put quotes around it. Set to 0777
# for world writeable. If you put this at 0755, you might need a
# script to remove any directories created as they will be owned
# by the web server or user nobody. Better solution might be to
# run the nph-build routine from the command shell.
$build_dir_per = 0777;

# The script can now break up category pages that have more then x
# number of links in it. It will also create next and previous links
# to help navigate. Set this to 1 if you want to break up pages or 0 if
# you want to have only one page per category.
# Setting this to one, will also break up the What's New pages into
# per day sections (not affected by number of links per page).
$build_span_pages = 1;

# Number of links per page.
$build_links_per_page = 10;

# Detailed View: The script can build a single html page per link. This is
# great if you have a review in your database. To enable, you must set
# the directory where all the pages will be stored, the url to that directory
# and set the enable option.
$build_detailed = 0;
$build_detail_path = "$build_root_path/Detailed";
$build_detail_url = "$build_root_url/Detailed";

# Use Templates: instead of editing site_html.pl, you can edit regular html pages
# encoded with special <%links_tags%>. It's not as flexible as site_html.pl, but it
# may be easier.
$build_use_templates = 1;

# Site Title, the default title to use. You should really spend some time customizing
# the directory though!
$build_site_title = 'Southwest Virtual Airways Links';

# Date Routines
# --------------------------------------------------------
# Your date format can be whatever you like, as long as the following
# two functions are defined &date_to_unix and &unix_to_date:
# The default is dd-mmm-yyyy.

sub date_to_unix {
# --------------------------------------------------------
# This routine must take your date format and return the time a la UNIX time().
# Some things to be careful about..
# timelocal does not like to be in array context, don't do my($time) = timelocal (..)
# int your values just in case to remove spaces, etc.
# catch the fatal error timelocal will generate if you have a bad date..
# don't forget that the month is indexed from 0!
#
my $date = shift; my $i;
my %months = map { $_ => $i++ } qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
my ($day, $mon, $year) = split(/-/, $date);

exists $months{$mon} or return undef;
$day = int($day); $year = $year - 1900;

require Time::Local;
my $time = 0;
eval {
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);
};
if ($@) { die "invalid date format: $date - parsed as (day: $day, month: $months{$mon}, year: $year). Reason: $@"; }
return $time;
}

sub unix_to_date {
# --------------------------------------------------------
# This routine must take a unix time and return your date format
# A much simpler routine, just make sure your format isn't so complex that
# you can't get it back into unix time.
#
my $time = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
$year = $year + 1900;
return "$day-$months[$mon]-$year";
}

sub long_date {
# --------------------------------------------------------
# This routine is for printing a nicer date format on the what's new page. It should
# take in a date in your current format and return a new one.
my $time = shift;
$time = &date_to_unix ($time);
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $time;
my @months = qw!January February March April May June July August September October November December!;
my @days = qw!Sunday Monday Tuesday Wednesday Thursday Friday Saturday!;
$year = $year + 1900;
return "$days[$dweek], $months[$mon] $day $year";
}

# -------------------------------------------------------------
# Extra Paths -- unless you feel the need to rename files, you
# can leave this as is.
# -------------------------------------------------------------

Thank you for your time.

Shawn Anderson
President and Webmaster
southwest Virtual Airways
http://www.virtualswa.com
Quote Reply
Re: 500 Server Error on admin.cgi In reply to
The only other thing I can of is that if your server uses cgiwrap, you will need to use different paths than what you have. Your configurations look fine to me.

Regards,

Eliot Lee

Quote Reply
Re: 500 Server Error on admin.cgi In reply to
Thanks. I'll try that. I just contacted valueweb Tech Support and he said the the server is a BSDI Unix server. Does that do anything to the scripts?

Shawn Anderson
President and Webmaster
southwest Virtual Airways
http://www.virtualswa.com
Quote Reply
Re: 500 Server Error on admin.cgi In reply to
Nope....Links has been tested and works in most servers, including Cobalt RAQ (running Apache) - with a little tweaking for NPH files, NT - IIS 4.0, many UNIX types running Apache, and Linux - Red Hat running Apache.

Regards,

Eliot Lee

Quote Reply
Re: 500 Server Error on admin.cgi In reply to
Thank you for the help Eliot. I had to change the variable for the # Use IIS headers? Set this to 1 if your web server needs the full headers (HTTP/1.0 etc.)
$db_iis = 1;
. I changed it from 1 to 0. The script has been running perfectly since the change a couple of days agoSmile. Keep up the great work on responses!!!

Shawn Anderson
Webmaster
Southwest Virtual Airways
http://www.virtualswa.com