Forum Moderators: coopster & phranque

Message Too Old, No Replies

Inserting Cgi into html

         

Newbie77

7:11 pm on Sep 14, 2004 (gmt 0)

10+ Year Member



I have installed a text clock in my cgi-bin and it works properly BUT I can't get my web page to display it at all.
I am using the command
<!--#exec cgi="http//:domain.example.com/cg-bin/textclock.cgi"-->
and nothing shows up on the page.
Is there variations of the exec command? I tested the cgi script by itself on it's own page, it's not that.
This is what my webhosting company says about cgi scripts. Please help!

Most CGI scripts written in Perl will work on Netfirms servers. For your scripts to work properly, you may need to change some paths or settings within the script to the following:

Perl 5 Location
#!/usr/bin/perl

Sendmail Location
/usr/lib/sendmail

CGI Url
[domain.example.com...]

Full or Absolute root path:

We recommend using the DOCUMENT ROOT environment variable to automatically insert the path in your Perl script:

$ENV{'DOCUMENT_ROOT'}

You may have to use "double quotes" around the path.

For example the full path to your www directory would be:
"$ENV{'DOCUMENT_ROOT'}/www"

The full path to your cgi-bin directory would be:
"$ENV{'DOCUMENT_ROOT'}/cgi-bin"

Alternatively, to find your document root use the printenv program: Type domain.example.com/cgi/printenv on any web browser.

[edited by: jatar_k at 7:13 pm (utc) on Sep. 14, 2004]
[edit reason] generalized urls [/edit]

upside

5:56 am on Sep 15, 2004 (gmt 0)

10+ Year Member



You don't want to just execute the script but to include it's output inside your html document. Try this:

<!--#include virtual="/cg-bin/textclock.cgi"-->

Newbie77

6:53 am on Sep 15, 2004 (gmt 0)

10+ Year Member



Thanks, I did try that but I just found out netfirms, my hosting company doesn't support either command, so much for the hours I spent on that one. Thanks again

upside

7:01 am on Sep 15, 2004 (gmt 0)

10+ Year Member



Well go find yourself a decent host that supports SSI so you can put all that work to use.