Gossamer Forum
Home : Products : Links 2.0 : Installation -- Windows :

Error: Unable to Add Link?

Quote Reply
Error: Unable to Add Link?
Hi There,

I'm trying to add my first link and I'm getting this error:

Error: Unable to Add Link

There were problems with the following fields:
URL (Invalid format)
Please fix any errors and submit the record again.

I've tried several different urls including:
http://www.rycon.net
and
http://www.powerpagehosting.com
But nothing seems to work, any ideas?

Thanks Guys!

Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
Is there anybody out there?
Quote Reply
Re: Error: Unable to Add Link? In reply to
Try adding the ending slash to the URLs.

Like the following:

Code:
http://www.rycon.net/

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: Error: Unable to Add Link? In reply to
Same thing...... URL (Invalid Format). I added the "3 Level of New Graphics" Mod, could that be it?

Thanks,
Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
I don't think so....This Mod does not conflict.

Have you made any changes to the valid expression column in the %db_def hash in the links.def file?

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: Error: Unable to Add Link? In reply to
Don't Think so, here it is, can you see anything that looks wrong?

%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']
);

Thank for all your help!!!

Mike



[This message has been edited by Mikeach (edited May 08, 2000).]
Quote Reply
Re: Error: Unable to Add Link? In reply to
Okay...that looks fine...the next thing to check is the db_utils.pl in the sub validate_record routine.

Have you made any changes in this sub-routine???

Please for the sake of argument list ALL the modifications you've made to the LINKS scripts!

Thank you.

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: Error: Unable to Add Link? In reply to
Hi Eliot,

The only mod I added was the "3 Level of New Graphics" mod. Here's the info you asked about:

sub validate_record {
# --------------------------------------------------------
# Verifies that the information passed through the form and stored
# in %in matches a valid record. It checks first to see that if
# we are adding, that a duplicate ID key does not exist. It then
# checks to see that fields specified as not null are indeed not null,
# finally it checks against the reg expression given in the database
# definition.
#
my ($col, @input_err, $errstr, $err, $line, @lines, @data);
my (%rec) = @_;

if ($rec{'add_record'}) { # don't need to worry about duplicate key if modifying
open (DB, "<$db_file_name") or &cgierr("error in validate_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp;
@data = &split_decode($_);
($data[$db_key_pos] eq $rec{$db_key}) and return "duplicate key error";
}
close DB;
}
foreach $col (@db_cols) {
if ($rec{$col} =~ /^\s*$/) { # entry is null or only whitespace
($db_not_null{$col}) and # entry is not allowed to be null.
push(@input_err, "$col (Can not be left blank)"); # so let's add it as an error
}
else { # else entry is not null.
($db_valid_types{$col} && !($rec{$col} =~ /$db_valid_types{$col}/)) and
push(@input_err, "$col (Invalid format)"); # but has failed validation.
(length($rec{$col}) > $db_lengths{$col}) and
push (@input_err, "$col (Too long. Max length: $db_lengths{$col})");
if ($db_sort{$col} eq "date") {
push (@input_err, "$col (Invalid date format)") unless &date_to_unix($rec{$col});
}
}
}
if ($#input_err+1 > 0) { # since there are errors, let's build
foreach $err (@input_err) { # a string listing the errors
$errstr .= "<li>$err"; # and return it.
}
return "<ul>$errstr</ul>";
}
else {
return "ok"; # no errors, return ok.
}
}


See anything?

Thanks!

Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
Nope...at this time, I would like to see your add.cgi script or your admin.cgi script to see what the heck is going on.

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: Error: Unable to Add Link? In reply to
I REALLY sorry, I sent you the wrong links.def info!!!! Here is the correct info:

%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://',
DateAdded => [14, 'date', 15, 15, 0, \&get_date, ''],
'^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes']
);

I will post the add.cgi and admin.cgi if you don't see anything here. Again, sorry for the mixup!

Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
Ok, I see the problem and have fixed it, now I can add links, but when I try and build the pages (including staggered) I get this:

'D:\WWW\maine-business\cgi-bin\links\admin\nph-build.cgi' script produced no output

Thanks a Bunch, you've been a great help!

Mike

Quote Reply
Re: Error: Unable to Add Link? In reply to
Ok, started with a fresh copy of everything and redid it, everything seems to work except I get this error when it's building the pages:

Updating New and Popular Records . . .
What's New Cutoff: 14 days
Popular Cutoff: 2 hits
Updating record: 3, marking as new.
Couldn't rename! Had to copy. Strange: Permission denied
Done.

Updating ratings ..
Couldn't rename! Had to copy. Strange: Permission denied
Done.


What directory is it trying to work in? It's my server so I can set permissions (which I thought was already all set).

Also, when I go to the index.html and then pick a cat. page, then try and rate a link, the link to rate it is bad, it's looking for rate.cgi to be in the cgi-bin directory, but it's in the cgi-bin/links directory. Any ideas?

Thanks again, and sorry for the last few messages (at least I figured most of it out myself!).

Mike


[This message has been edited by Mikeach (edited May 08, 2000).]

[This message has been edited by Mikeach (edited May 08, 2000).]
Quote Reply
Re: Error: Unable to Add Link? In reply to
Well, I am glad you decided to start over and if you had posted your REAL links.def file initially, I would've been able to spot the problem.

Anyway...the problem is that you have not set all the directories correctly to 777 (drwxrwxrwx) as specified in the README file.

The permissions for 777 for NT are the following:

Code:
IWAM/MACHINENAME = Read, Write, Execute
IUSR/MACHINENAME = Read, Write, Execute
Everyone = Read, Write, Execute
Administrator = Read, Write, Execute, Delete

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: Error: Unable to Add Link? In reply to
Ok, I'm running Win2000 with IIS v5. I go to the security for the cgi-bin/links and the www.maine-business.com/links directories and they are:

Full Control OFF
Modify OFF
Read & Execute ON
List Folder Contents ON
Read ON
Write ON

What about the link to rate.cgi I menitioned in the last message? Thanks again!

Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
What about it?

You probably have not set the correct URL in the links.cfg file. Look at the bottom section of the file where the rate.cgi file is defined.

*sigh*

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: Error: Unable to Add Link? In reply to
Ok, guess your getting tired of helping me? The add function from the admin menu uses add.cgi, correct? If so,then something is wrong here, because if I use the add from the index page I get the 404 error, just like the rate.cgi. So, if I change the link.cfg, will it still work from the admin menu? I really do appreciate all your help!

Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
 
Quote:
The add function from the admin menu uses add.cgi, correct?

Incorrect.

Quote:
If so,then something is wrong here, because if I use the add from the index page I get the 404 error, just like the rate.cgi.

Uh...check the links you have in your template files...I betcha you have the wrong URLs or tags for the .cgi scripts.

Quote:
Ok, guess your getting tired of helping me?

Let's say it's been a long day and leave it at that.

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: Error: Unable to Add Link? In reply to
Ok, sorry you had one of those days! I havn't changed the templates at all (yet).

I fixed it, I changed the url to the user cgi-bin to www.maine-business.com/cgi-bin/links, before I didn't have the /links on the end. The docs for this part should say the cgi-bin/links dir. For us beginers anyway! Thanks for ALL your help, I would NOT have this running at all without your help!

Mike
Quote Reply
Re: Error: Unable to Add Link? In reply to
Glad you got it running.

Good for you!

Smile

BTW: I struggled with NT for months at my old job with limited technical assistance, so I empathesize with the frustrations you are going through.

Thank goodness I am back working with UNIX servers.

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.




[This message has been edited by AnthroRules (edited May 09, 2000).]