Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Cant jump!!!

Quote Reply
Cant jump!!!
Can't call method "count" on an undefined value at ...... /cgi/jump.cgi line 56.

Beta 5.

Ideas?



Quote Reply
Re: Cant jump!!! In reply to
yup. i have that as well. forgot to say yesterday but it is still there :)

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: Cant jump!!! In reply to
I'm stuck then. Site's broke.

Any idea's Alex?



Quote Reply
Re: Cant jump!!! In reply to
Just a guess... try adding:


$click_db = $DB->table('ClickTrack');

just above the row:

my $rows = $click_db->count ( { LinkID => $id, IP => $ip, ClickType => 'Hits' } );

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Cant jump!!! In reply to
> Just a guess... try adding:
> $click_db = $DB->table('ClickTrack');
> just above the row:
> my $rows = $click_db->count ( { LinkID => $id, IP => $ip, ClickType => 'Hits' } );

Ok, I did the above and now I get the following:
Undefined subroutine >::Date::date_get called at /sites/http/nextgen.ionus.com/docs/cgi/jump.cgi line 59.

Any thoughts on this?

Wil

Quote Reply
Re: Cant jump!!! In reply to
same problem here to in Beta 5:

A fatal error has occured:

"Can't call method "count" on an undefined value at /jump.cgi line 56.

Please enable debugging in setup for more details."


Quote Reply
Re: Cant jump!!! In reply to
Add

Links::init_date();


just above the first date call.


PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Cant jump!!! In reply to
I get this after adding the two fixes to jump.cgi:

Can't locate GT/Date.pm in @INC (@INC contains: /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl .) at /jump.cgi line 13.
BEGIN failed--compilation aborted at /jump.cgi line 13.
[Sat Jan 13 02:55:15 2001] [error] [client] Premature end of script headers: /jump.cgi


Quote Reply
Re: Cant jump!!! In reply to
I made a change... It was a typpo (too many kids).

Check the changed message.

you need to initialize the Date routines.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Cant jump!!! In reply to
obs..I just put GT::Date to high up, because when I put if after
use Links qw/$USER $IN $DB $CFG/;
use Links::SiteHTML;

it worked!

Thanks!

Quote Reply
Re: Cant jump!!! In reply to
I checked this on my system, the way it should look, is down around line 60:

In Reply To:
my $ip = $ENV{REMOTE_HOST} || $ENV{REMOTE_ADDR} || 'None';
$click_db=$DB->table('ClickTrack'); ## add this
my $rows = $click_db->count ( { LinkID => $id, IP => $ip, ClickType => 'Hits' } );
if (! $rows) {
Links::init_date(); ## add this
my $now = GT::Date::date_get();
$db->indexing(0);
$db->update ( { Hits => \"Hits + 1" }, { ID => $id } );
$db->indexing(1);
$click_db->insert ( { LinkID => $id, IP => $ip, ClickType => 'Hits', Created => $now } );
}
Notice, the two extra lines added.

I think the "Links::init_date();" takes the place of 'use GT::Date;', and initializes the defaults and features the way Links expects.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ




Quote Reply
Re: Cant jump!!! In reply to
That worked like a charm. Thanks much.

Wil

Quote Reply
Re: Cant jump!!! In reply to
Pugdog,

hate to sound like a beer commercial but..........

"I luv you man!!!!!!!!!!!!"

Back working!!

Lance

Quote Reply
Re: Cant jump!!! In reply to
Dude! Are you on GT's payroll? If not, YOU SHOULD BE! Shocked

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Cant jump!!! In reply to
I can't overwrite jump.cgi due to permissions. Any ideas?

Quote Reply
Re: Cant jump!!! In reply to
If you are on a virtual server, you may have to install a script to run as a CGI that will do some filemanagement for you as the webserver. You can find such scripts on cgi-resources.com ... just delete them when you are not using them to prevent security problems.

If you are on a dedicated server, you need to become root.

I have not checked it out, but you might be able to install fileman (from GT) and use that to do the file stuff. Alex is looking into adding this sort of file management to complement the MySQLMan so that these permissions problems are not so problematic :)



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ