Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Recommend It Quick Problem

Quote Reply
Recommend It Quick Problem
A quick problem when I u/g to 2.1. Recommend It came up with the server error 500. I dug through the archives and found the patch Robert/Pugdog posted. Now it goes to a blank screen - no errors - just a blank screen.

Can anyone give me a hint at what to look at?

Thanks

Howard J. Brubaker
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
Check your error log.

Also, you need to check your script, since a blank screen in this case usually means a plugin error ie: plugin didn't compile properly. Make sure you closed all your ' and didn't leave any ;

2.1 handles errors differently.


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 Quick Problem In reply to
From the error log. I'm checking for missing things.

Can't call method "param" on an undefined value at recommend_it.cgi line 120.
[Fri Apr 19 16:05:35 2002] [error] [client 63.217.245.254] Premature end of script headers: /home/cust1/usr1126/cgi-bin/links/recommend_it.cgi
[Fri Apr 19 17:42:48 2002] [error] [client 61.171.95.40] Client sent malformed Host header
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
You need to add the new required headers.

They are listed here in the forum in similar threads, or in the detail_page.cgi update thread.

I'd type them in again, but I'd probably make a mistake.


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 Quick Problem In reply to
Robert,

I check your new headers from the thread Recommend_it 2.1.0 dated 03/22/2002. Your quote:


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.

--------------------------


Now I get the 500 internal server error & the log reads:

BEGIN failed--compilation aborted at recommend_it.cgi line 77. [Mon Apr 22 15:57:23 2002] [error] [client 63.217.245.254] Premature end of script headers: /home/cust1/usr1126/cgi-bin/links/recommend_it.cgi

Screem here.

hjb
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
What part did you have in code? The bit up to the ----- part, or upto the 'Every line starts...' part?

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: [wizcom] Recommend It Quick Problem In reply to
Remove "use" from the Links::init and Links::init_user lines.
Quote Reply
Re: [Paul] Recommend It Quick Problem In reply to
Oops, Yes Andy, it's up to that line.

Paul, I changed that and now I'm back to the blank screen.

Nothing in the error log that I can see.

hjb
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
I don't know how that slipped by, but the headers need to 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 '/path/to/admin';

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

# Required in _ALL_ scripts for Gossamer Community compatibility
Links::init ('/path/to/admin'); # no use, that was the line above

# Optional -- but if $USER is defined in the above line, this line is necessary.
Links::init_user ('/path/to/admin'); # no use, that was two lines above.

## define the other modules you'll need in the script
use GT::Mail;
use Links::SiteHTML;
use Links::Plugins;


The rest is commentary.


PUGDOG� Enterprises, Inc.

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

Last edited by:

pugdog: Apr 22, 2002, 6:19 PM
Quote Reply
Re: [pugdog] Recommend It Quick Problem In reply to
>>
Links::init_user ('/path/to/admin'); # no use, that was two lines above.
<<

Should be just:

Links::init_user (); # no path needed.
Quote Reply
Re: [Paul] Recommend It Quick Problem In reply to
OK, Copied the exact code Pugdog posted, adding the correct path to admin. Made the change Paul suggested. Now back to 500 Internal Server Error. Log says:

Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 97.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 101.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 103.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 107.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 115.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 119.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 289.
Global symbol "$REC_CFG" requires explicit package name at recommend_it.cgi line 289.
Execution of recommend_it.cgi aborted due to compilation errors.
[Tue Apr 23 08:55:03 2002] [error] [client 63.217.245.254] Premature end of script headers: /home/cust1/usr1126/cgi-bin/links/recommend_it.cgi

Thought maybe Pugdog forgot something, added the 2 lines he had previous:
use Links::Authenticate;
use vars qw/$REC_CFG/;

Now back to the blank screen and nothing in the error log.

Am I loosing it here?

hjb
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
Try removing:

use Links::Authenticate;
Quote Reply
Re: [Paul] Recommend It Quick Problem In reply to
Same result, blank screen, nothing in error file.

hjb
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
Ok, take the modified plugin file, stick it back into the .tar file, and run a perl check on it. See if anything complains. Error reporting is very different in 2.1.0 and it's one thing I'm trying to fix up.

I'm working on a fragmented system still, one of my machines refuses to come back on-line, and that is the machine that has, and does, my network backup, and has all my archives on it.

Last resort is a new harddrive, install windows from scratch, and move the other drives up one letter.

have I said I hate windows??


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 Quick Problem In reply to
Robert,

You're way over my head. I tried to put it in a tar file but that didn't work right.

Any other ideas on what's happening.

hjb
Quote Reply
Re: [wizcom] Recommend It Quick Problem In reply to
sorry, I've been trying to get my network back up, that machine is stilll causing a problem.

If you create a blank plugin, and then insert this (or any .cgi or .pm file into it) you can run perl-check on it, and it will create the Links environment, so dependent modules and the library files are loaded.


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 Quick Problem In reply to
"create a blank plugin" huh? I think I'll just wait til you find the corrections/backup and repost the plug-in.

I still wonder if it was the plug-in's fault or mine

hjb