Gossamer Forum
Home : Products : Links 2.0 : Customization :

Bobsie, help with your mod, please?

Quote Reply
Bobsie, help with your mod, please?
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:
# -------------------------------------------
# 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";
# ---------------------------------------------
Quote Reply
Re: Bobsie, help with your mod, please? In reply to
Two things to check... 1) make sure the top line of the script point to the correct path to perl. 2) change the links.cfg require line to the full path.

Another person had a similar problem and neither of those fixes worked for him. However, the script ran fine from telnet so, if you have telnet access, you could run the script that way.

I hope this helps.
Quote Reply
Re: Bobsie, help with your mod, please? In reply to
What would you recommend I do if I checked everything you said and it still doesn't work, but I can't access it through Telnet? Is there anything else I can try?
Quote Reply
Re: Bobsie, help with your mod, please? In reply to
What URL are you using to execute the script? If you prefer, you can send that to me via email so you don't have a bunch of people trying to execute your script (send to bobsie@orphanage.com ).

Try changing the name of the script to .cgi if it ends with .pl and try it again. It should be runnable from the web as is and I really have no idea as to why some people can't do that.

[This message has been edited by Bobsie (edited June 24, 1999).]