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

Add.cgi problem

Quote Reply
Add.cgi problem
I have everything working, but I can't get my user add site function to work. Always get an error. I have tried everything. All my cgi's have the full path to links.cfg. I made some modifications, but I deleted them all, and started over with the default ones. My site is at:
http://www.fictionfind.com

Can anyone tell me what I'm doing wrong?

Thanks,

Darkstar

Quote Reply
Re: Add.cgi problem In reply to
I already added a post in the Thread where you initially posted this problem. Mad

Your problem is that you have the Add Site link as:

Code:

http://top40sw.hypermart.net/cgi-bin/Links/add.cgi


Then in your form codes, you have the following codes:

Code:

<FORM action="http://top40sw.hypermart.net/cgi-bin/Links/add.pl" method="POST">


See the problem??? It looks like that you are hard-coding the link to the add.cgi script either in your top frame header file or in the add template files.

Regards,

Eliot Lee
Quote Reply
Re: Add.cgi problem In reply to
the whole problem is that I can't find where the add.pl is. I looked in all the add_.... templates. Not there. Where is the top frame header?

Quote Reply
Re: Add.cgi problem In reply to
I don't know where your top header file is! But it looks like you are using frameset within your site.

How have you configured the $build_add_url variable in your links.cfg file???? That is probably the source of your problem.

Good luck!

Regards,

Eliot Lee
Quote Reply
Re: Add.cgi problem In reply to
$db_script_url = $db_dir_url . "/admin.cgi"; # Admin script.
$db_header_path = $db_script_path . "/header"; # Place to store header and footers.
$db_footer_path = $db_script_path . "/footer";
$build_search_url = $db_cgi_url . "/search.cgi"; # URL of search script.
$build_add_url = $db_cgi_url . "/add.cgi"; # URL of add script.
$build_modify_url = $db_cgi_url . "/modify.cgi"; # URL of modify script.
$build_jump_url = $db_cgi_url . "/jump.cgi"; # URL of jump script.
$build_email_url = $db_cgi_url . "/subscribe.cgi"; # URL of email update script.


looks fine to me. Ahhh I hate this. It used to work, then one day poof!

Quote Reply
Re: Add.cgi problem In reply to
Well, the problem IS with your add.html file.

Do you have the following codes in that file?

Code:

<form action="<%db_cgi_url%>/add.cgi" method="post">


OR

Code:

<form action="<%build_add_url%>" method="post">


If you do not have either of the code lines I posted, then guess what...you do not have the proper codes in the add.html template file. And while you are at it, make sure that you have either of the code lines I posted in the add_error.html template file as well.

Are you using template files? If not, then check the codes in the sub site_html_add_form and sub site_html_add_failure in the site_html.pl.

You should have the following codes in those subs:

Code:

<form action="$build_add_url" method="post">


OR

Code:

<form action="$db_cgi_url/add.cgi" method="post">


Regards,

Eliot Lee
Quote Reply
Re: Add.cgi problem In reply to
Thanks, I finally went and searched for add.pl in every single one of my files. Finally in add.html, and add_error.html(above the form code) I found the problem. I just changed add.pl to add.cgi. I have no Idea how that happened in the first place.

Now I can add sites, but my Build function doesnt work. It just shows a blank page when I hit "Build". I have all the permissions set right according to the file and permissions FAQ. it says that nph-build.cgi has access denied.

Any Ideas?

Thanks again for your help Eliot.

Darkstar(a.k.a. Roscus)

Quote Reply
Re: Add.cgi problem In reply to
In Reply To:
Thanks, I finally went and searched for add.pl in every single one of my files. Finally in add.html, and add_error.html(above the form code) I found the problem. I just changed add.pl to add.cgi. I have no Idea how that happened in the first place.
That is the FIRST thing you should've done after I suggested that in my earlier post. After using Links 2.0 for the past two years, I think I know what I am talking about....Mad

In Reply To:
Now I can add sites, but my Build function doesnt work. It just shows a blank page when I hit "Build". I have all the permissions set right according to the file and permissions FAQ. it says that nph-build.cgi has access denied.
Your server may not be configured to execute NPH files. Go to the FAQ section of Links in the Resource Center and apply the code hack for NPH files/RAQ server.

Regards,

Eliot Lee
Quote Reply
Re: Add.cgi problem In reply to
Ok, I finally figured it all out. I did what you said, but it didn't affect anything, so I just deleted nph-build.cgi, nph-verify.cgi, and nph-email.cgi. And then re-uploaded them. Chmod to 755 and it works!

Thanks for all your help, I hope I wont be needing it anytime soon!

Bye,

Darkstar(a.k.a. Roscus)

Quote Reply
Re: Add.cgi problem In reply to
Good....glad you figured it out...You might've intially uploaded the files in BINARY mode, which put carriage returns in the file, which prohibits scripts from executing.

Regards,

Eliot Lee