Gossamer Forum
Quote Reply
Recommend_it 2.1.0
I've installed the latest version of recommend_it but keep getting an internal server error for some reason. I've been searching the forums but most information seems to regard older versions. The install went perfectly and I've linked exactly as shown in the help files. Is their a known issue with the current version of Links SQL right now?

Thanks for any info
Perl Hopefull
Quote Reply
Re: [stilton] Recommend_it 2.1.0 In reply to
Yes, you need to change the headers.

use Links qw/$IN $DB $CFG $USER/; # I need these vars
Links::init ('/path/to/admin'); # Required
## /path/to/admin is the same as your use lib '/path/to/admin'
Links::init_user ('/path/to/admin'); # Optional


You need the $USER and init_user lines if you are using the Logon features, even for the editors or admin.

This is a change due to Gossamer Community, and it's required of _ALL_ programs, not just the plugins. You can see it in the headers of all the scripts in 2.1.0

I still haven't gotten updated versions of the plugins on-line. I never seem to be at the right computer at the right time (when I remember).


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Recommend_it 2.1.0 In reply to
Thanks Pugdog...worked beautifully!
Perl Hopefull
Quote Reply
Re: [pugdog] Recommend_it 2.1.0 In reply to
pugdog,

for the dummies like me, could you be so kind as to show us what was there, and what it should look like when we are done changing the headers? In other words, so I can just cut and paste the new headers and replace the old ones? (I know I'll have to fix the path/to/admin part)
Quote Reply
Re: [Evoir] Recommend_it 2.1.0 In reply to
Well, each script will have minor differences, usually in the

use Links qw/.../

part, but the real change is you need to add the two init lines.

You only need the

Links::init_user...

line if you've declared $USER in the "use Links qw/../" line.

If you plan to use Gossamer Community, though, it's a good idea to leave the $USER variables in place.

In my scripts, at least, I check to see if logons are enabled, and use $USER when it is. Some of my scripts will only run if $USER is enabled....

To summarize, the only 3 lines that need to be added or changed:

Code:
use Links qw/$IN $DB $CFG $USER/; # I need these vars - $variables may be different in each script.
Links::init ('/path/to/admin'); # Required in _ALL_ scripts for Gossamer Community compatibility
Links::init_user ('/path/to/admin'); # Optional -- if $USER is defined in the above line, this line is necessary.
## /path/to/admin is the same as your "use lib '/path/to/admin' "


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Recommend_it 2.1.0 In reply to
You don't need the path to admin for Links::init_user()
Quote Reply
Re: [Paul] Recommend_it 2.1.0 In reply to
I was asking for recommend_it 2.10 for Links 2.10

But I'll try to figure it out from what you wrote.
Quote Reply
Re: [pugdog] Recommend_it 2.1.0 In reply to
Hey Pugdog,

I have changed the headers, and they now look like this:
Code:
# Load required modules.
# ---------------------------------------------------
use strict;
use lib '/path/to/my/admin'; ## you need to set this to your own local path!
use Links qw/$IN $DB $CFG $USER/; ## initialize the Database, CGI and other basic objects.
use Links::SiteHTML;
use Links::init ('/path/to/my/admin';) # Required in _ALL_ scripts for Gossamer Community compatibility
use Links::init_user ('/path/to/my/admin';) # Optional -- if $USER is defined in the above line, this line is necessary.
use Links::Authenticate;
use GT::Mail;
use Links::Plugins;
use vars qw/$REC_CFG/;

I think this is what you suggested. I made sure that the file was chmod 'ed to 755 and a text document.

Still getting an Internal Server error. Can you help me out?

Last edited by:

Evoir: Apr 10, 2002, 12:35 AM
Quote Reply
Re: [Evoir] Recommend_it 2.1.0 In reply to
Check your error log :)
Quote Reply
Re: [Evoir] Recommend_it 2.1.0 In reply to
if 'path/to/my/admin' is really the unix path, and not "path/to/my/admin" <G> then do what paul suggested, and check your error logs.

Unfortunately, since all the include files and such, you can't do a perl -c command and get it to compile in most cases. The only thing you can do is go to your error log.

Although... one way to get around it, is to keep a dummy plugin file around, and you can paste any script into the tar file and do a [perl check] on it. That sets the environment correctly.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Recommend_it 2.1.0 In reply to
Hi pudog,

It dosent work!

I got this errormessage: "The server encountered an internal error or misconfiguration and was unable to complete your request. " (I use a cobalt raq4 - may be problems with cgi_wrapper?)

Is there any error in the script I changed?:

# Load required modules.
# ---------------------------------------------------
use strict;
use lib '/home/sites/site6/web/cgi-bin/katalog/admin'; ## you need to set this to your own local path!
use Links qw/$DB $IN $USER $CFG/; ## initialize the Database, CGI and other basic objects.
use Links::SiteHTML;
use Links::init ('/home/site/site012/web/cgi-bin/katalog12/admin'); # Required in _ALL_ scripts for Gossamer Community compatibility
use Links::init_user ('/home/site/site012/web/cgi-bin/katalog12/admin'); # Optional -- if $USER is defined in the above line, this line is necessary.
use Links::Authenticate;
use GT::Mail;
use Links::Plugins;
use vars qw/$REC_CFG/;

Regards from Bonn, Germany

Peter Diesler
----
journalismus.com, peter diesler
wielsgaesschen 1, 53115 bonn
tel.: +49 (0228) 215272, fax +49 (0228) 215288
mailto:pdiesler@journalismus.com
http://www.journalismus.com
Quote Reply
Re: [diesler01] Recommend_it 2.1.0 In reply to
Hi,

Did the error log show anything more specific?

I don't use cgi-wrap so I don't know much about it, and where it can have problems.

I'm still not set back up, we had torrential rains this weekend, several areas ended up underwater... so I didn't even try to move the machines, but I did take them apart <sigh>. Hopefully I'll do that tonight, and be up tomorrow.

Once I do, I'll have updates released. It's been a mess here, litterally. I've been running cables, thank goodness there is a false ceiling! Last time I had to pull them through the walls, and floors. I just hope there is no interference from the fluorescent bulbs.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Recommend_it 2.1.0 In reply to
In Reply To:
Hi,

Did the error log show anything more specific?
In Reply To:
Sorry no.

Perhaps someone else can help? Peter
Quote Reply
Re: [diesler01] Recommend_it 2.1.0 In reply to
This might not be it, but the headers should look like:

Code:
## catch most basic coding errors, and keep mod_perl compatible.
use strict;

## you need to set this to your own local path!
use lib '/home/sites/site6/web/cgi-bin/katalog/admin';

## initialize the Database, CGI and other basic objects.
use Links qw/$DB $IN $USER $CFG/;

# Required in _ALL_ scripts for Gossamer Community compatibility
use Links::init ('/home/site/site012/web/cgi-bin/katalog12/admin');

# Optional -- but if $USER is defined in the above line, this line is necessary.
use Links::init_user ('/home/site/site012/web/cgi-bin/katalog12/admin');

## define the other modules you'll need in the script
use GT::Mail;
use Links::SiteHTML;
use Links::Plugins;
use Links::Authenticate;
use vars qw/$REC_CFG/;


Every line starts with 'use' and ends with a ;

Lines with # or ## are comments and refer to the line below.

The code above is just cleaned up, rearranged, but not changed in any way. All I did was adjust the "white space", to make it easier to follow.

BTW -- you are using 'site6' and 'site012' in the above headers. That might be your problem.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.