Can someone tell me why ?

liunx

Guest
I have a tell friend cgi when I up load it and run directly to tellfriend.cgi it work but when I execute it via SSI it return 405 Mothod not allowed . So confused

<!-- m --><a class="postlink" href="http://www.canhchimviet.com/hoangphuc.shtml">http://www.canhchimviet.com/hoangphuc.shtml</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.canhchimviet.com/cgi-bin/tellfriend.cgi">http://www.canhchimviet.com/cgi-bin/tellfriend.cgi</a><!-- m -->

they just call one cgi file , so why ?

Thank in advanceplease don't tell me about design , it's just a page :D , you can see a form there . that's it !There is no action in your form tag:

<form method="POST">

and I don't see any JAVA script to define the action. Try adding the action= attribute to your form tag...

<form method="POST" action="cgi-bin/tellfriend.cgi">

change tellfriend.cgi to the correct name/URL of the script if necessary.

Kevinthat form is output from telfriend.cgi . The cgi must have work so that that form appear .

I wonder why with exacly codes but i work when it alone but not work when call it via SSI
you can try to "tell" you yourself . :(
<!-- m --><a class="postlink" href="http://www.canhchimviet.com/cgi-bin/tellfriend.cgi">http://www.canhchimviet.com/cgi-bin/tellfriend.cgi</a><!-- m -->

you'll see 2 textbox the top is your email and below is your friend email . The same with <!-- m --><a class="postlink" href="http://www.canhchimviet.com/hoangphuc.shtmlThe">http://www.canhchimviet.com/hoangphuc.shtmlThe</a><!-- m --> form on this page:

<!-- m --><a class="postlink" href="http://www.canhchimviet.com/hoangphuc.shtml">http://www.canhchimviet.com/hoangphuc.shtml</a><!-- m -->

does not know what to do. It does not matter that it is displayed using an Ssi call from the script.

When the button on the form is clicked on, the form will try and send the data to the server for processing. But since your form is not directed to any script (and is not using action=mailto:, and is probably in a directory that does not allow scripts to be run anyway, you get the error message.

The form on this page:

<!-- m --><a class="postlink" href="http://www.canhchimviet.com/cgi-bin/tellfriend.cgi">http://www.canhchimviet.com/cgi-bin/tellfriend.cgi</a><!-- m -->

is outputted by the script same as the other page, but it is in the same directory as the script (cgi-bin/tellfriend.cgi). When the button on that form is clicked on, it finds the script and sends the data. tellfried.cgi might be the only script in the cgi-bin directory, that is why the form can run the script without using the action=cgi-bin/tellfriend.cgi attribute. If there were other scripts in the cgi-bin, I believe the form would not know which script to use and would return an error message. When there is only one scriupt in the cgi-bin it is run by default.

If the website is using frontpage extensions then my explanation may not be correct. I do not have experience with frontpage extensions.

Kevin:) thank you kevin , I understand you . It fixed

Thank so much .... <!-- m --><a class="postlink" href="http://www.canhchimviet.com/hoangphuc.shtml">http://www.canhchimviet.com/hoangphuc.shtml</a><!-- m -->
 
Back
Top