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

recommend_it.cgi Problems

Quote Reply
recommend_it.cgi Problems
I hope, anyone could help me.
Since I moved to another server and did a completely new installation of LinksSQL 2.0.4 the new installed recommend_it.cgi doesn't work any more.

The paths are all correctly set and the cgi itselfs works. But when a message should be send to anyone by pressing the "send" button an internal server error occurs.

My error-logs are saying the following :
-----------------------------------------
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Undefined subroutine &Links::load_template called at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi line 301.
[Tue Jun 5 10:12:35 2001] [error] [client 193.159.122.117] Premature end of script headers: /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi
Links SQL: $TPL was imported by Links, but is no longer used at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/Links.pm line 50.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Undefined subroutine &Links::load_template called at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi line 301.
[Tue Jun 5 13:13:24 2001] [error] [client 193.159.122.117] Premature end of script headers: /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi
----------------------------

I don't really know what it is.


Quote Reply
Re: recommend_it.cgi Problems In reply to
Check that the Templates.pm file exists, and that the permissions on it are correct. There may have been some changes in the new version to it which is causing conflicts with this script.

Posting like 959 of the Templates.pm file would probably help :) I haven't downloaded/installed the latest version so I don't know what is what.

Discuss webhosting at
The Webhost Area Forums!
http://www.webhostarea.com/forums/
Quote Reply
Re: recommend_it.cgi Problems In reply to
Hi,

I'm assuming this is my script?

I'm in the process of redoing them all, to make them compatible with 2.04. There have been some subtle changes in how things work, and I've hit some really odd bugs that I don't quite understand either.

I'm pretty sure I am using all LinkSQl calls now, but I will have to check.

The recommend_it script was a hack of a hack, which I then tried to re-do to make it Links SQL 2.0 compatible, and might have missed converting something.

Usually the error you are seeing is due to using a database handle directly, and forgetting to dispose of it. (just what the error says!).

Going through the Links modules/routines should do this house keeping automatically.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: recommend_it.cgi Problems In reply to
@pugdog: yes, indeed it's your script. i got it from the plugin-dowload-area in the admin.

when will an updated version for 2.0.4 be out ?

Quote Reply
Re: recommend_it.cgi Problems In reply to
I am experiencing the same problem ... worked perfectly under 2.0.3 but when I upgraded to 2.0.4 - Server 500 errors once the 'submit' button is pressed to send the mail. Sounds as though you are not the only person experiencing this problem.


Regards,

Clint.

--------------------------
http://www.AffiliatesDirectory.com - Affiliate Programs Directory
Quote Reply
Re: recommend_it.cgi Problems In reply to
Hi,

I just got the UploadLogo script updated, and I think I also got bad_link. Recommendit will be next.

Also a minor tweak to detail_page.cgi and one other. I was actually pretty productive the past few days.

Sunday/Monday are always bad for me, time wise, but I'll try to get these updated/uploaded, since I know they are in use on many sites. In most cases, it is a very small fix -- it just doesn't seem to be the same small fix in each program <G>



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: recommend_it.cgi Problems In reply to
For a quick fix, try changing:

## my $formatted_message = Links::SiteHTML::display('email_recc.txt', {%TAGS, %$rec});
my $formatted_message = Links::load_template ('email_recc.txt', {%TAGS, %$rec});

to:
my $formatted_message = Links::SiteHTML::display('email_recc.txt', {%TAGS, %$rec});
## my $formatted_message = Links::load_template ('email_recc.txt', {%TAGS, %$rec});


(switch the comment lines... there was probably a reason I did that, but I don't know why....?)

The &load_template routine was removed from Links.pm, but really, it should have been turned into a dummy call, just passing the values to SiteHTML::display.... maybe Alex will consider putting it back in, just to prevent all these scripts from breaking :)



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: recommend_it.cgi Problems In reply to
@pugdog:

thanks for the tip, but switiching the comment lines doesn't help :

error log:
-----------------
Links SQL: $TPL was imported by Links, but is no longer used at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/Links.pm line 50.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Issuing rollback() for database handle being DESTROY'd without explicit disconnect() at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/GT/Template.pm line 959.
Invalid method: site_html_email_recc.txt (email_recc.txt.html) at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/Links/SiteHTML.pm line 216.
[Mon Jun 11 07:11:52 2001] [error] [client 62.158.180.88] Premature end of script headers: /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi
Invalid method: site_html_email_recc.txt (email_recc.txt.html) at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/Links/SiteHTML.pm line 216.
[Mon Jun 11 07:13:50 2001] [error] [client 62.158.180.88] Premature end of script headers: /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi
---------------



Quote Reply
Re: recommend_it.cgi Problems In reply to
My copy doesn't have it, but if you see $TPL up at the top, in the

use Links qw/$CFG $USER $DB/ ... etc line, remove that variable. That also disappeared in this release.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: recommend_it.cgi Problems In reply to
Thanks, but there is no $TPL-variable in the whole recommend_it.cgi at all.



Quote Reply
Re: recommend_it.cgi Problems In reply to
Ah... something is still importing that, but here is the real error:

In Reply To:

[Mon Jun 11 07:11:52 2001] [error] [client 62.158.180.88] Premature end of script headers: /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/recommend_it.cgi
Invalid method: site_html_email_recc.txt (email_recc.txt.html) at /is/htdocs/17979/www.shop-netz.com/cgi-bin/shop/admin/Links/SiteHTML.pm line 216.
Chnage the line to :

my $formatted_message = Links::SiteHTML::display('email_recc', {%TAGS, %$rec});
## my $formatted_message = Links::load_template ('email_recc.txt', {%TAGS, %$rec});


_AND_

rename the template email_recc.txt to email_recc.html in the templates directory.

That should fix it. That would explain why I bypassed SiteHTML.pm and went straight for the &load_template routine.




PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: recommend_it.cgi Problems In reply to
The $TPL error is coming from the .pm file, that's been fixed too. I should have the 2.1.0 version out as soon as I can find my ID/Password for the plugins area.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: recommend_it.cgi Problems In reply to
Yeah ! Now it works !

The only thing is
------
Name : Unknown Tag: 'site_name'
Shop: Absolut-Online
URL : http://www.shop-netz.com/cgi-bin/shop/jump.cgi\?ID=26
------

at the recc-success.html. But I think this is a minor bug.

Thank you very much !

Quote Reply
Re: recommend_it.cgi Problems In reply to
Not a bug, really.

Check the .cgi file, make sure something is defined, if not, make sure you have a site_name global defined in the globals.txt file.

It needs to have that variable to print a welcome message, but you can also edit the templates to get rid of that tag...

The other thing, is make sure that tag shouldn't have just been the "Title" of the links record. The clip you sent made it look like it was the "link" information. _BUT_ remember, some people are going to want to send "links" and others are going to want to send a URL to a page on their site... so that tag (that whole file) needs to be edited to your liking and needs.

Every template set is a bit different, and you can edit/change the tags as needed. Not every site will use the same tags... or define them the same.





PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum