Gossamer Forum
Home : Products : Gossamer Links : Discussions :

add.cgi and rate.cgi don't work... ??

Quote Reply
add.cgi and rate.cgi don't work... ??
I have upgraded to Links 2.01 and have double-checked to make sure the templates are set up correctly. I'm not sure where else to look... Here's the problem:

Rate.cgi - after submitting the rate for the link, the browser goes to the home page instead of redirecting to the error or success page
Example: http://66.33.26.222/lp/rate.cgi?ID=3632

Add.cgi - after submitting a link to be added, the browser goes to add.cgi instead of redirecting to the error or success page.
http://66.33.26.222/lp/add.cgi?ID=154

In either case, the information is not sent to the database.



Any ideas?

Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
For the rate form...

Add value="*". (Replace * the corresponding number for each of the select options.)

Also, make sure that you have mistakingly put in a closing form tag </form> before the rate select field drop-down codes. Since you are using compression option, it is hard to weed through all your codes.

For the add form....

Again, look at your codes again....I would recommend copying the default ADD form codes and paste them into your add.html template file.

Regards,

Eliot Lee
Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
I tried to look at your HTML, but it seems you have compress on, and it's way too hard to try to read.

You've got very complicated pages.

Take eliot's suggestion, and make sure your html tags are all properly nested.

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


Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Thanks for your responses!

I had already tried uploading the default add.html and had the same problem.... I'll try that again and doublecheck all my values again.

Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Hmm... are you sure there can't be something else wrong?

As I said above, I have already double-checked (and rechecked) the code... I am using the exact page from the old site (where it worked fine), and I have even tried uploading the default template, and it responds the same way.

Here's an example... I have uploaded the yahoo rate.html and haven't touched the code.
http://66.33.26.222/lp/rate.cgi?ID=3632
--It redirects to the home page.

Same story here: add.html
http://66.33.26.222/lp/add.cgi?ID=143
--it just keeps going back to add.cgi

Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Are you sure all your paths are set correctly??

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


Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Yeah, I double-checked that again...all looks fine. search.cgi and jump.cgi work properly.. all the admin functions work fine. I haven't tried modify, subscribe, or any of the user stuff.

I noticed that in the demo, you have to register in order to add or rate a link... I wonder if there is some reason it isn't working when you have that option turned off??

Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
I don't know. All my sites require registration as spam protection, and to enable the user/editor features properly. So, it's possible.

Did you try reinstalling??? Sometimes that works.

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


Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Hi,

There is something wrong in the form as if you go to:

http://66.33.26.222/lp/rate.cgi?ID=3632&rate=10

It rates the resource successfully.

Try changing the METHOD="POST" to METHOD="GET" in the FORM tag. See if that works. If it does, can you provide me shell access so I can see why form posts are not working?

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Hi,

Actually, now that I remember, form POSTS won't work if you have persistent_env turned on and you are not under a persistent env. Try turning that option off.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Alex,

Thanks for the help. I changed POST to GET and the forms work now :)

As for persistent_env, it is turned on, but I am using speedy_cgi, so I wouldn't want to turn it off would I? Would you still like to take a look at things, or is the persistent_env why this is happening?

Thanks again,
Amanda

Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
Hi,

Are you sure you are using SpeedyCGI? If you have persistent_env set to off, and you are actually using SpeedyCGI, then you will run into problems later (as the script won't properly reset itself).

If you have persistent_env set to on and are not using SpeedyCGI, then the script will be a bit slower, and you won't be able to do FORM posts.

It's important to leave this as no unless you are sure you really are running under a persistent env.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: add.cgi and rate.cgi don't work... ?? In reply to
I just thought of something... when I first set up the installation, I didn't have speedy installed. My script pages still have /usr/bin/perl at the top even though I updated the path in setup.

I just manually changed the path on the add.cgi file and the POST method worked. Hopefully I can just change the path manually without running into any other problems...