Gossamer Forum
Home : Products : Links 2.0 : Customization :

Updated & 3-Level New

Quote Reply
Updated & 3-Level New
Hi,

I am trying to install Bobsie's Updated" & 3-Level "New"
Graphic Usage Modification
. But I got stucked at Step: 5 where I have execute add_date.pl.

When I run add_date.pl I get 500 error. As far as I know there are two possibilities for this problem


#!/usr/local/bin/perl
pointing to perl program

# Change the following line to full path to links.cfg if you have problems.
require "../links.cfg";
.

I am not a perl guru. Is there any guru could tell me what is going wrong? I already checked some threades of this forum with similer problem but I could not find any solid answer.

Here is the code of add_date.pl


#!/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";

# ---------------------------------------------




Thank you and happy holiday.


Regards,

Pagla

Quote Reply
Re: Updated & 3-Level New In reply to
Is the perl path correct????
and if you can get it to work, put the FULL path to your links.cfg file, like this:
/home/htdocs/~user/path/to/your/links.cgf/file
it should look something like that, got it? ^_^

Hiryuu Manga Network: El Portal Otaku en tu idioma.
http://www.hiryuu.com
Quote Reply
Re: Updated & 3-Level New In reply to
 
I did hiryuu but same old 500 error. Any other suggestions?

Regards,

Pagla

Quote Reply
Re: Updated & 3-Level New In reply to
I know this is a very basic thing to ask, but have you CHMODed the script to 755?

Quote Reply
Re: Updated & 3-Level New In reply to
 
Thanks.

I tried that too.

I accessed my servers error log through ftp and the error is the following:
Premature end of script headers:

Any idea?


Regards,

Pagla

Quote Reply
Re: Updated & 3-Level New In reply to
Three problems:

1) The following line of codes:

Code:

require "../links.cfg";


needs to include the ABSOLUTE PATH to where your links.cfg file is located NOT the
RELATIVE path of ../.

2) The following codes:

Code:

$rec[$db_dateadded] = $rec[$db_modified];


should be the following:

Code:

$db_dateadded = $db_modified;


3) The script MUST be executed in your data directory OR you must also include
the ABSOLUTE paths to the links.db and links2.db.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Updated & 3-Level New In reply to
 
Thanks Eliot.

I did exactly what you said but I am still getting 500 error.


require "/home/my_name/public_html/cgi-bin/links/admin/links.cfg";


I am executing this script from data directory too.

I also changed the code to

$db_dateadded = $db_modified;


I don't know what to do anymore.


Regards,

Pagla

Quote Reply
Re: Updated & 3-Level New In reply to
 
Any idea anyone? I am going crazy here.


Regards,

Pagla

Quote Reply
Re: Updated & 3-Level New In reply to
Uh..and the following are correct, right???

1) Permission of the script (755), right?
2) The Perl path, right?

CHECK THEM AGAIN! Tongue

Regards,

Eliot Lee