Gossamer Forum
Home : Products : Links 2.0 : Customization :

PassWord Mod - 500 ERROR

Quote Reply
PassWord Mod - 500 ERROR
Hello, I installed the password mod by phoenix. That password part is working fine (when adding URL) BUT... When I click on "Modify URL" I'm getting a "500 server error" Please help Frown

I have gone over all the steps a billion times, can't figure it out.

I think the problem should be somewhere in the modify.cgi's sub main ?

Here is what I have:

###########
sub main {
# --------------------------------------------------------
local (%in) = &parse_form;

# We are processing the form.
if ($in{'Submit'}) {
&process_form;
}
# Otherwise we are displaying the form (in site_html.pl), displaying
# the entrance (Asks for Link ID and Password)
else {
if ($in{'ID'} =~ /^\d+$/) {
my (%rec) = &get_record ($in{'ID'});

if ($rec{$db_key} eq $in{'ID'}) {
if ($rec{'Password'} eq $in{'password'}) {
&site_html_modify_form (%rec);
}
else {
&site_html_modify_failure ("Password Invalid: $in{'password'}");
}
}
else {
&site_html_modify_failure ("Unkown Link ID: $in{'ID'}");
}
}
else {
&site_html_modify_first;
}
}
}
####


Here is the site_html_modify_first

#####
sub site_html_modify_first {
#---------------------------------------------------------
# displays the form for users to enter the ID number and
# Password for the Link they wish to modify

&html_print_headers;
print &load_template ('modify_first.html', {
%globals
});
}
#######

And the site_html_modify_form
#######
sub site_html_modify_form {
# --------------------------------------------------------
# This routine determines how the modify form page will look like.

my %rec = @_;
my $category = &build_select_field ("Category", "$rec{'Category'}");

&html_print_headers;
print &load_template ('modify.html', {
category => $category,
country => &build_select_field ("Country", "$rec{'Country'}"),
%rec,
%globals
});
}
#####

I know is right in front of me I just can't see it ??? Frown




[This message has been edited by Patricio (edited February 02, 2000).]
Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Hello, hoping for some direction.
For some reason the modify.cgi must not be building the page ? There fore the 500 error ? I carefully followed the mod's steps and have review it to no end. Obviously I'm missing something.

Your feedback is greatly appreciatted
Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Go to the 31 reply Thread in the Discussion Forum where I helped a LINKS user re-write the Password Mod, which works more effectively with LINKS now.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
31 reply Thread in the Discussion Forum ??

Reply threats are number ? did I miss something ?

I did do a full search for "password mod eliot" no luck....

Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Go here:


Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Nice try Eliot, but all that talk left me pretty confused. I'm still pretty green at this...

My password mod is working fine. Smile

Fields have been added to:
links.def, database.

modify.cgi has been updated according to mod's instructions.

site_html_templates.pl has been updated
with new sub site_html_modify_first and per mod's instructuions sub site_html_modify_form was also changed.

NOW:
User can register no problem.
Registrations are mail back to me, validaded, confirmed, mailed, etc.

The problem is when I go to any page and click on "Modify URL" a 500 error comes up ?

I assume the problem lies on the modify.cgi ?
(code posted earlier)


Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
1) Check your Perl Error Log for syntax errors or malformatted codes.

2) To manually check the syntax of the file, do the following via telnet:

a) Connect to your cgi-bin directory:

Code:
cd /cgi-bin/links/

b) Check the syntax:

Code:
perl -c modify.cgi

PLEASE PROVIDE EXACT ERROR MESSAGES NOT JUST THE INTERNAL SERVER ERRROR MESSAGE!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
I am intereted in protecting the admin page as well, however, our site is hosted on a NT server. I see discussion in the forums regarding passwords and UNIX systems, would this password mod work on NT just as well?
Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Eliot....Will do.
----
Kenya.... No this is a different password mod is for users who add and later modify URL's additions.

Check resource center or do a search for ways others have password protected Admin. page.
Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Here it is:

ella:~/www/cgi-bin/links$ perl -c modify.cgi
Bad name after REMOTE_HOST:: at modify.cgi line 168.

I'm on my way to see where this may be ?

UPDATE:
Here it is... ?? but is this related ??

NEW LINK:
===============================================
Title: $in{'Title'}
URL: $in{'URL'}
Description: $in{'Description'}
Country: $in{'Country'}
Type: $in{'Type'}
Contact Name: $in{'Contact Name'}
Contact Email: $in{'Contact Email'}
Category: $in{'Category'}
Encontraste: $in{'Encontraste}

Remote Host: $ENV{'REMOTE_HOST'}
Referer: $ENV{'HTTP_REFERER'}

This is working just fine, don't know why it says bad name ??

UPDATE:

THIS LINE READS...
Encontraste: $in{'Encontraste}
IT SHOULD READ...
Encontraste: $in{'Encontraste'}

NO 500 ERROR NOW Smile I'm testing it further, was that it ????



[This message has been edited by Patricio (edited February 07, 2000).]

[This message has been edited by Patricio (edited February 07, 2000).]
Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
kenya,

Search this Forum for Admin Mod v2.0. This Mod will protect your admin.cgi script.

Patricio,

Looks like that was the error.

Also, make sure that you have the following codes after the ENVIRONMENTAL VARIABLES:

Code:
To update, please go to:
$db_script_url

Sincerely,

Links Manager.
|;

Regards,



------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Got it !!! Smile
My templates just need a little tweaking Smile with <%values%> and NOW IT ALL WORKS !! Smile

--> Only 2 things left:

1. I need to change the Email Subject: (need it in Spanish) in my emails to users who add or modify. I know the text is in the email templates but where are the email's Subject ??

2. Where are the errors list such as...

Category can't be left blank, etc

Thank you Smile
Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
 
Code:
email-add.txt
email-mod.txt
email-del.txt

To edit the Email Subject...edit the $subject lines in the sub send_email in both the add.cgi and modify.cgi files.

Quote:
2. Where are the errors list such as...

Most of the error messages are located in the .cgi files or in the db_utils.pl file in the sub validate_records routine.

Regards,


------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------








Quote Reply
Re: PassWord Mod - 500 ERROR In reply to
Found the errors....DONE
email_xxx.txt HAD ALREADY BEEN TRANSLATED

Found Subject in add.cgi and modify.cgi sub send_email. However this is the subject of the email sent by LINKS to the Administrator.

I need to modidy the subject of the Email LINKS sends to user... after their link has been validated: "Your link has been added" (it seems to be the same subject when you add or modify your resource)

UPDATE: FOUND IT Smile

The Subject line I needed to get to is at the admin_html.pl in the sub html_validate_email Wink


[This message has been edited by Patricio (edited February 07, 2000).]