Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Perl Monks,

We have a newsfeed in our cgi-bin at:

http://64.176.72.84/cgi-bin/booksunlimited/pull_news.pl

I have placed the command
<--#exec cgi=/cgi-bin/booksunlimited/pull_news.pl -->
(second character on the command is ! but then doesn't show on this messageboard)

at:

http://64.176.72.84/booksunlimited/index.html

But it doesn't work. It doesn't show the newsfeed on the page like I want it. What are we doing wrong?

I have tried tinkering with the permissions to both the files/URLs, changed the directories, and also tried using the command in my index page, but it doesn't work.

Do you know why this might be?

Thank you very very much.

Nadeem Azam
http://www.litmania.com

Replies are listed 'Best First'.
RE: CGI Command - Please help!
by chromatic (Archbishop) on Aug 09, 2000 at 21:39 UTC
    That's an SSI (Server Side Include) command, not specifically a Perl command. You'll need to indicate to your web server somehow that it should parse the page and execute SSI commands. Often, this is done by enabling an SSI handler for pages with the shtml extension.

    Basically, this is a web server configuration question, since the SSI command shows up in the HTML source.

Re: CGI Command - Please help!
by tiny (Beadle) on Aug 09, 2000 at 22:38 UTC
    The path in your SSI statement absolutely must be a relative path. Remove the leading slash and use some combination of .. 's to get to your perl script. I have run into this problem several times and it's fairly frustrating!

    Update: You must also make sure the file has an .shtml extension, and that you have configured Apache to use the Includes directive on that directory. Test a normal SSI include with --#include virtual="test.html" -- to make sure SSI is working.
      .shtml is not absolutely necessary if you fiddle with file extensions in your apache setup.
      Also available is XBitHack which only requires you set the .html file as executable chmod w+x and apache will ssi process it just fine.
      --
      Jay Thorne, alpha geek for UserFriendly
RE: CGI Command - Please help!
by BigJoe (Curate) on Aug 10, 2000 at 00:49 UTC
    Change the file to index.shtml and it will work.

    --BigJoe

    Learn patience, you must.
    Young PerlMonk, craves Not these things.