Hi Bobsie,
I was trying to install your mod for 3 new and update graphics. Everything was fine until I had to make the add_date.pl file. I made the file, but when I tried to execute it I got a 500 internal server error. Do you have any idea why? This is the file I used:
#!/usr/local/bin/perl
# -------------------------------------------
# Change the following line to full path to links.cfg if you have problems.
require "../links.cfg";
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$ENV{'REQUEST_METHOD'} and (print "Content-type: text/plain\n\n");
print "Opening links.db for reading. . .\n";
open (DB, "<links.db")
or print "Unable to open links database 'links.db'. Reason: $!" and exit;
print "Opening links2.db for writing. . .\n";
open (DBOUT, ">links2.db")
or print "Unable to open output database. Reason: $!" and exit;
print "Processing database records. . .\n";
LINE: while (<DB> ) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp; # Remove trailing new line.
@rec = &split_decode($_);
$rec[$db_dateadded] = $rec[$db_modified];
print DBOUT &join_encode(&array_to_hash(0, @rec));
}
print "Done, closing database files. . .\n";
close DB;
close DBOUT;
print "Links database now has DateAdded field completed.\n";
print "It is stored in links2.db\n\n";
# ---------------------------------------------
I was trying to install your mod for 3 new and update graphics. Everything was fine until I had to make the add_date.pl file. I made the file, but when I tried to execute it I got a 500 internal server error. Do you have any idea why? This is the file I used:
#!/usr/local/bin/perl
# -------------------------------------------
# Change the following line to full path to links.cfg if you have problems.
require "../links.cfg";
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$ENV{'REQUEST_METHOD'} and (print "Content-type: text/plain\n\n");
print "Opening links.db for reading. . .\n";
open (DB, "<links.db")
or print "Unable to open links database 'links.db'. Reason: $!" and exit;
print "Opening links2.db for writing. . .\n";
open (DBOUT, ">links2.db")
or print "Unable to open output database. Reason: $!" and exit;
print "Processing database records. . .\n";
LINE: while (<DB> ) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp; # Remove trailing new line.
@rec = &split_decode($_);
$rec[$db_dateadded] = $rec[$db_modified];
print DBOUT &join_encode(&array_to_hash(0, @rec));
}
print "Done, closing database files. . .\n";
close DB;
close DBOUT;
print "Links database now has DateAdded field completed.\n";
print "It is stored in links2.db\n\n";
# ---------------------------------------------