Gossamer Forum
Home : Products : Links 2.0 : Customization :

My Links Cgi.pm carp

Quote Reply
My Links Cgi.pm carp
I appreciate that this is not directly a links problem but I have been trying to get the my links mod working with no luck.

I email my web host enquiring about the cgi.pm carp and he replied that he did not beleive it was instaled but I could install this in my home directory.

It must be noted that I am not a perl type person, installing links and the mods is about as good as I get.

I downloaded the module if thats what you call it from the cgi - resource centre, my pc is windows based and my server is unix based.

I have temporarily lost my telnet connection.

I would appreciate some pointers as what to do with these files that I downloaded and if I need to point the mylinks.cgi file to these.

One again I apologise for using these boards but I do not know who else to ask.

Many many thanks

Davy C

Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
What I would recommend doing is uploaded the CGI.pm modules that you downloaded in your /cgi-bin/links directory where your mylinks.cgi file is located.

Then you will need to change the following codes in your mylinks.cgi file:

Code:
use CGI ();
use CGI::Carp qw/fatalsToBrowser/;

to the following codes:

Code:
use CGI;
use Carp qw/fatalsToBrowser/;

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: My Links Cgi.pm carp In reply to
Thanks Eliot

Away to give it a try

DavyC
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
Sorry now getting a 500 error, however I think the problem is with me, I only uploaded the cgi.pm file and carp.pm file, although there are loads of other files there. The instructions state that I need to go to the directory and type in makeperl.pl the make and then install.

I know I am a pain but to my unexperienced brain it would look as though I would need to get my telnet running again.

Me not know

DavyC

Smile

Ps was inspired by your site, I think it is great.
Quote Reply
Re: My Links Cgi.pm carp In reply to
You only need CGI.pm and Carp.pm files. And make sure they are case sensitive. You need to upload CGI.pm NOT cgi.pm and Carp.pm NOT carp.pm.

To check the syntax of your .cgi scripts, do the following (as has been provided MANY times in this forum and in the Installation Forum)....

1) Connect to your account via telnet.
2) Connect to your directory where the mylinks.cgi is located:

Code:
cd /cgi-bin/links/

3) Check the syntax of the mylinks.cgi file:

Code:
perl -c mylinks.cgi

BTW: Your hosting company should really be responsible for compiling the needed modules for their customers.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: My Links Cgi.pm carp In reply to
Sorry I must becoming a real pain, but I have about two threads of hair left, and still cannot get this mod to work.

If anybody has time please please check the following.

mylinks.cgi

============================================
# Cookie information.
my %cookie = (
name => 'MyLinks',
expires => '+3y',
path => '/',
domain => '.foylenet.com'
);

# Deliminator (MUST BE A LETTER [no symbols or numbers]!)
my $delim = 'x';

# Links to display per page.
my $per_page = 10;

# Characters used in encoding/decoding.
my @e = qw!0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z!;

# Load required modules and libraries.
# ---------------------------------------------------
use CGI ();
use CGI::Carp qw/fatalsToBrowser/;
require "admin/links.cfg";
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$build_use_templates ?
require "$db_lib_path/site_html_templates.pl" :
require "$db_lib_path/site_html.pl";
=============================================

my_home.html
=============================================

<%total%>
<%links%>

I know but I just want to get it working!!!!


site_html_templates.pl

============================================

# My Link Mod

sub site_html_my_link {
my %rec = @_;
($rec{'isNew'} eq 'Yes') ? ($rec{'isNew'} = 1) : (delete $rec{'isNew'});
($rec{'isPopular'} eq 'Yes') ? ($rec{'isPopular'} = 1) : (delete $rec{'isPopular'});
return &load_template ('my_link.html', {
%rec, %globals
});
}


sub site_html_my_home {
# --------------------------------------------------------
# This routine shows the layout of the MY Link Home Page
my $my_link;
my $tags = shift;
print &load_template ('my_home.html', {
%$tags,
%globals
});
}

sub site_html_my_add {
my %rec = @_;
print &load_template ('my_add.html', {
%rec,
%globals
});
}

sub site_html_my_add_error {
my $message = shift;
print &load_template ('my_add_error.html', {
message => $message,
%globals
});
}

sub site_html_my_delete {
my %rec = @_;
print &load_template ('my_delete.html', {
%rec,
%globals
});
}

sub site_html_my_delete_all {
my $tags = shift;
print &load_template ('my_delete_all.html', {
%$tags,
%globals
});
}

sub site_html_my_delete_error {
my $message = shift;
print &load_template ('my_delete_error.html', {
message => $message,
%globals
});
}

sub site_html_my_help {
# --------------------------------------------------------
# This routine displays the help page
my $tags = shift;
print &load_template ('my_help.html', {
%$tags,
%globals
});
}


I have also found the module.cgi file and ran it on my server and found this

CGI::Switch
CGI
CPAN::FirstTime
CPAN::Nox
CPAN::Config
CPAN
Carp
Class::Struct

From another query in the MY LINKS thread this would indicate that I have the proper modules, although my web provider does not seem to know, he stated that I would have to install them.

I know I'm pushing my luck but this really does appear to be a great mod.

I also checked with Fish-hoo and Eliots site and found the cookies on my pc.

When I click on bookmark it a get this

0

and nothing else which comes from the <%total%> tag.

when I run mylinks.cgi straight from the browser I get the same.

Sorry, and thanks if anyone has the patience to work their way through all of this.


Thanks thanks and thanks again

DavyC
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
I have changed my call to the script to www.mydomain.com and copied Eliots my_home.html section for the templates.pl file, still no luck. I have two periods in the call.

Is there a specific place in the template.pl file to insert the codes, as my template file is already heavily modified.

Away to try more things!!!!!!

Thanks

Dc
Frown
Quote Reply
Re: My Links Cgi.pm carp In reply to
YOU HAVE NOT CHANGED THE CODES I SUGGESTED!

Wink

Find these codes in your mylinks.cgi script:

Code:
use CGI ();
use CGI::Carp qw/fatalsToBrowser/;

AND CHANGE THESE CODES TO:

Code:
use CGI;
use Carp qw/fatalsToBrowser/;

PLEASE read my suggestions carefully and at least try to use them.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: My Links Cgi.pm carp In reply to
I had uploaded the two pm files in the links cgi-bin and checked for case sensitivity. I changed the mylinks.cgi as you stated, but I now get a 500 error.

I deleted the two files and ran widgetz module.cgi file which would appear to have found the modules. In other words my provider does not know what he has on his server.

I tried this way again and get the 500 error again.

I'm lost

Dc
Smile (3.45am here start work at 7.00 no sleep again tonight - but I'll work it out)
Quote Reply
Re: My Links Cgi.pm carp In reply to
I've got my telnet up and running again and ran the syntax check on mylinks.cgi as stated it comes back ok

more puzzled

Dc

Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
 
Quote:
I deleted the two files and ran widgetz module.cgi file which would appear to have found the modules. In other words my provider does not know what he has on his server.

Okay...Well, did you change the file to 755 (rwxr-xr-x)?

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: My Links Cgi.pm carp In reply to
yes tried 777

still trying

very says you

Dc
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
 
Quote:
yes tried 777

Uh...no...look again at my Reply...the file needs to be set to 755 (rwxr-xr-x).

Regards,



------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: My Links Cgi.pm carp In reply to
Eliot I have uploaded the modules and ran the telnet line you gave me, I am getting an error on line 44 the carp line.

Presently trying different settings, I beleive this may be the problem as it is not even saving the cookie.

Is there light at the end of the tunnel,

Dc

Smile
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
Sorry I take it I upload the pm files in ASCII

Dc
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
Everything is now 755 both pm files uploaded in ASCII when I run telnet I get

"fatalsToBrowser" is not exported by the Carp module at mylinks.cgi line 44
Can't continue after import errors at mylinks.cgi line 44
BEGIN failed--compilation aborted at mylinks.cgi line 44.


Me no a perl programmer, lost

dc
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
 
Quote:
"fatalsToBrowser" is not exported by the Carp module at mylinks.cgi line 44
Can't continue after import errors at mylinks.cgi line 44
BEGIN failed--compilation aborted at mylinks.cgi line 44.

The problem is with your server configurations...these modules have not been properly compiled by your hosting company. Since you said that these modules are already in your server...try deleting the .pm files in your account.

If that doesn't work...then contact your hosting company and ask them to completely compile all Perl lib files, including all the current Perl modules.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: My Links Cgi.pm carp In reply to
Hi Eliot

Thanks for help.

Found the problem, after three days. I had not used add in the link, I had placed in id twice. I know - me sorry, and very tired.

Your help really was appreciated.

Re the modules I emailed my host again, to which they replied they were not sure but, they thought I would have to install them in my home directory. I ran widgetz module file and found them, I even gave the company the address of the module file, and left a txt version for them. But they still said I would have to install them.

I do not wish to name them on these boards due to any implication that my involve Gossamer Threads - however I will tell you that they claim to be one of the biggest if not biggest provider in the Uk. They boast over 14,000 accounts, enough said, anybody in the Uk having same problem may email me.

Now that I have it running, I was wondering if there are any templates, still available, as I have found a few sets on the net but they are all converted and I would be more interested in reading the tags that were used. I like the way your site shows the link that has just been added before it bounces you back to the my_home.html

Once again Eliot many thanks for your help and your patince, BTW do you ever take any time off.

Thanks

Dc
Smile
Quote Reply
Re: My Links Cgi.pm carp In reply to
Someone has posted their template files in this forum before...try searching the multiple My LINKS Topics.

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.