Gossamer Forum
Home : Products : Others : Gossamer Community :

Possible bug when running a plugin via SSH...

Quote Reply
Possible bug when running a plugin via SSH...
I appear to have hit a bug with the Community plugin. I get the following error, whenever running a plugin from SSH;

Quote:
GT::Plugins (27046): Plugin pre auth_valid_session stopped further plugins. at /home/ameinfo/ameinfo.com/cgi-bin/events/admin/GT/Plugins.pm line 99.

This ia a bit weird...cos I don't call auth_valid_session, I simply include Links::Plugins.

The top part of my script, looks a bit like;

Code:
#!/usr/local/bin/perl
# ==================================================================
# Links SQL - enhanced directory management system
#
# Website : http://gossamer-threads.com/
# Support : http://gossamer-threads.com/scripts/support/
# CVS Info : 087,070,093,092,086
# Revision : update_days.cgi v 2.0
#
# Copyright (c) 2002 Gossamer Threads Inc. All Rights Reserved.
# Redistribution in part or in whole strictly prohibited. Please
# see LICENSE file for full details.
# ==================================================================
# Plugin developed by Andy Newby from http://www.ace-installer.com.
# THIS IS NOT A FREE PLUGIN!
# ==================================================================

use strict;
use lib '/path/to/admin';
use Links qw/$IN $DB $CFG $USER/;
use GT::SQL;
use GT::Date;
use Links::Plugins;
my $debug = 0;

local $SIG{__DIE__} = \&Links::fatal;

Links::init();
Links::init_user('/path/to/admin');

Any ideas GT?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Possible bug when running a plugin via SSH... In reply to
This has been discussed lots recently. It's not a bug, it's debugging.
Quote Reply
Re: [Andy] Possible bug when running a plugin via SSH... In reply to
It's not a bug.

The line
Code:
Links::init_user('/path/to/admin');
calls the Auth_Community plugin, and the output you get is just a debug message (which should not appear, that's a bug that has been discussed a few times) that is directed to STDERR. If you run your script from the browser, you will find the same error message in the error logs.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Possible bug when running a plugin via SSH... In reply to
Ok..I've removed the init_user etc lines removed. Not sure why I had them in there to start with...its a SSH running program...so no user input would exist Laugh

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Possible bug when running a plugin via SSH... In reply to
Oh also, you've got that backwards, init() needs to take the path to the admin directory, init_user() does not need any arguments (it may well work without a path, but won't be portable and may break on some systems).

Cheers,

Alex
--
Gossamer Threads Inc.