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

admin.cgi error

Quote Reply
admin.cgi error
I am having some problems installing the script on our server. When I run admin.cgi I get this error.

---
Error including libraries: syntax error in file /usr/home/design/www/cgi-bin/links/admin/links.cfg at line 153, next 2 tokens "my $date "
Illegal modulus of constant zero in file /usr/home/design/www/cgi-bin/links/admin/links.cfg at line 154, next 2 tokens "months ="
syntax error in file /usr/home/design/www/cgi-bin/links/admin/links.cfg at line 154, next 2 tokens "map {"
syntax error in file /usr/home/design/www/cgi-bin/links/admin/links.cfg at line 154, next 2 tokens "qw!"

Make sure they exist, permissions are set properly, and paths are set correctly.
---

but the paths and permissions are set... I also edited the path on line 45 in admin.cgi to point to links.cfg

---
require "/usr/home/design/www/cgi-bin/links/admin/links.cfg"; # Change this to full path to links.cfg if you have problems.
---

My server info is viewable @
http://www.bgdi.com/cgi-bin/diver/perldiver.cgi

URL of the problem page:
http://www.bgdi.com/cgi-bin/links/admin/admin.cgi

Any help would be greatly appreciated, Thanks
- Mike

Quote Reply
Re: admin.cgi error In reply to
Your problem is your Perl version...you must have Perl 5.0053 to run Links successfully.

Regards,

Eliot Lee
Quote Reply
Re: admin.cgi error In reply to
It sounds like a problem i have had on Hypermart servers. Are you on Hypermart.net?

Andy

Quote Reply
Re: admin.cgi error In reply to
Thanks AnthroRules, looks like that's most likely the problem. I'll send an e-mail over to my ISP, looks like they're running 5.00401, hopefully they can upgrade it.

youradds - actually my ISP is lanminds in Berkley.

Quote Reply
Re: admin.cgi error In reply to
My server is running 5.6.0 is that version of PERL ok for the script to run in?

thanks
-harris

Quote Reply
Re: admin.cgi error In reply to
You will probably come across problems with the date functions in LINKS 2.0, like many other LINKS 2.0 users who have experienced problems using the upgraded Time::Local Perl module.

All Gossamer Threads have been written for Perl 5.0053, not Perl 5.006

Regards,

Eliot Lee
Quote Reply
Re: admin.cgi error In reply to
Okay hypermart does have Time::Local installed. I checked this out. My problem is on line 184

code snip:
Code:
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(/-/, );
exists $months{$mon} or return undef;
$day = int($day); $year = $year - 1900;
require Time::Local;
my = 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: ). Reason: $@"; }
return $time;
}
it's causing a syntax error on my = 0;