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

500 Internal Server Error

Quote Reply
500 Internal Server Error
why me from error when I open the page of the administrator?

thanks
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] 500 Internal Server Error In reply to
Check the CHMOD (file permissions), admin.cgi should be 755, so should nph-build.pl.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] 500 Internal Server Error In reply to
Because me from this error

thanks

CGI ERROR
==========================================
Error Message : Error building! Links database is 0 bytes!
Script Location : nph-build.cgi
Perl Version : 5.006001

Form Variables
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] 500 Internal Server Error In reply to
Before links will create pages, you must have at least one category with one link. Add those, then build.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] 500 Internal Server Error In reply to
Why another error?

thank

CGI ERROR
==========================================
Error Message : fatal error: Can't locate /web/htdocs/www.nauticalink.it/home/cgi-bin/annunci/admin/annunci.def at admin.cgi line 55.

Script Location : admin.cgi
Perl Version : 5.006001
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [blecchi] 500 Internal Server Error In reply to
Did you rename something? It's looking for annunci.def, which is not part of the download. links.def is, and is what tells the script where to find everything else it needs.


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] 500 Internal Server Error In reply to
As I must modify this script

thanks

# -------------
# Links
# -------------
# Links Manager
#
# File: links.def
# Description: Contains the database definition for links.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.01
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================

# Database Definition: LINKS
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']
);

# Database file to use -- defined in links.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'Links Database';
$html_object = 'Link';

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13;

# Field number to sort links by:
$db_sort_links = 1;

# Field names you want to allow visitors to search on:
@search_fields = (1,2,5);

# System defaults. When adding new links or modifying links, these fields
# can not be overwritten by a user.
%add_system_fields = (
isNew => 'No',
isPopular => 'No',
Hits => '0',
Rating => 0,
Votes => 0,
ReceiveMail => 'Yes'
);

# Hash of column names to possible options. If you want to use a select form
# field, you can use &build_select_field in your HTML page. This routine will
# make a <SELECT> input tag using the following values:
%db_select_fields = (
isNew => 'Yes,No',
isPopular => 'Yes,No',
ReceiveMail => 'Yes,No'
);

# Hash of column names to radio values. If you use &build_radio_field, it will
# make a <INPUT TYPE="RADIO"> tag for you using the options specified in the hash.
%db_radio_fields = ( );

# Maximum number of hits returned in a search. Can be overridden in the search
# options.
$db_max_hits = 10;

# Use the built in key tracker.
$db_key_track = 1;

# ===========================================================================
# Build up some variables from your definitions. Internal use only.
@db_cols = ();
foreach (sort { $db_def{$a}[0] <=> $db_def{$b}[0] } keys %db_def) {
push (@db_cols, $_);
$db_sort{$_} = $db_def{$_}[1];
$db_form_len{$_} = $db_def{$_}[2];
$db_lengths{$_} = $db_def{$_}[3];
$db_not_null{$_} = $db_def{$_}[4];
$db_defaults{$_} = $db_def{$_}[5];
$db_valid_types{$_} = $db_def{$_}[6];
($_ eq $db_key) and $db_key_pos = $db_def{$_}[0];
}

1;
- - - - - - - - - -- - - - - -
DirectoryNautica-Italia
http://www.nauticalink.it
Quote Reply
Re: [PerlFlunkie] 500 Internal Server Error In reply to
My mistake, links.cfg is what tells the script where everything else is, links.def is the structure of your categories. The line from admin.cgi that is calling for it is this (I include line numbers):

54 # Load the database definition file and set the link url.
55 $in{'db'} ?
56 require "$db_lib_path/$in{'db'}.def" :
57 require "$db_lib_path/links.def";

Is the file you posted above named links.def on your server? Is it also called that in links.cfg? Have you added categories using the admin? In links.cfg, here is the stock code:

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



At the bottom of that file is $db_lib_path = $db_script_path;

So, the db_lib_path from lines 56 and 57 in admin.cgi is the same as the db_script_path from links.cfg.


Leonard
aka PerlFlunkie