Web Hosting Talk







View Full Version : Can someone please help me before I pull my hair out?


Kit
12-04-2002, 07:04 PM
Okie dokie, I'm not a programmer and I don't really know any of the fancy languages (ie: Perl, C++, etc), the only one I really know and know well is HTML...anyway and I'm having a lot of trouble linking to a cgi-script. It works fine when I preview in a browser, but it's suppose to also be placed on the page. The script is called Ratem (for more info go here:http://cgi-resource.co.uk/pages/ratem.shtml)

It says that I can link to it by:

_____________________
From instructions-

Use either of the two methods below for linking to it. Make sure you use a different id number for each item you want peopel to vote on.


1. If you have SSI you can use the exec cgi command like:
<!--#include virtual="http://path to your site/cgi-bin/ratem.cgi?id=3" -->
This'll display the voting form and results directly on any page.


2. If you don't have SSI you can just link to it:
http://path to your site/cgi-bin/ratem.cgi?id=3


SSI example:

Say you had item1, item2 and item3.

Item1 <!--#include virtual="http://path to your site/cgi-bin/ratem.cgi?id=1" -->
Item2 <!--#include virtual="http://path to your site/cgi-bin/ratem.cgi?id=2" -->
Item3 <!--#include virtual="http://path to your site/cgi-bin/ratem.cgi?id=3" -->

However, I'm not really sure how #2 works and I can't get the SSI examples to work (and yes, I checked, I do have SSI).

This is what I changed when I use the SSI code:
<!--#include virtual="http://www.sweet-madness.net/cgi-bin/ratem.cgi?id=1" -->

But nothing happens, did I forget to change something else (Which I believe I did, because I checked the URL and it works).

Can anyone help me?

beowulfdk
12-04-2002, 07:27 PM
Does your file have the extension of .shtml ? On 99% of the servers offering SSI it needs to have that extension in order for the SSI to get parsed as SSI.

Kit
12-04-2002, 08:30 PM
hmmm...okay, well, if my file isn't in .shtml, do you know how the other one is to suppose to work? The one that says:
2. If you don't have SSI you can just link to it:
http://path to your site/cgi-bin/ratem.cgi?id=3

I know that just by putting the path won't do anything, so how exactly does it work?

impudicity
12-04-2002, 08:35 PM
And another way, that i've seen many times it to create a new blank page, with the background the same color as the background on your site. Use the shtml, and have it on your page via Iframe.

Kit
12-04-2002, 08:46 PM
I dunno, how does .shtml work exactly? Is it exactly like HTML? The only probably I see with your solution, impudicity, is that I also need the script for other things besides for my page.

elsmore1
12-04-2002, 11:55 PM
Originally posted by Kit


This is what I changed when I use the SSI code:
<!--#include virtual="http://www.sweet-madness.net/cgi-bin/ratem.cgi?id=1" -->

But nothing happens, did I forget to change something else (Which I believe I did, because I checked the URL and it works).

Can anyone help me?

The instructions you were working from were poorly written (wrong in fact). You may not include a hostname in an include virtual URL. In other words, you cannot include (using an include virtual SSI tag) content from a domain other than the one with the include virtual tag, because all URLS specified must be relative to the current document or relative to the Document Root (without and with a beginning slash respectively)

The following would probably be what you wanted, assuming you were trying to include a script from your own site (www.sweet-madness.net)


<!--#include virtual="/cgi-bin/ratem.cgi?id=1" -->