Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting SSI scripts in SHTML pages 3

Status
Not open for further replies.

JennyW

Technical User
Mar 1, 2001
323
CA
Hi,

I have a perl script that dynamically places a Poll on an html page, but I can’t seem to get it working.

I uploaded, chmod’ed and made internal adjustments to all the files to related to the script. I followed every step specified in the readme file (I obviously went wrong somewhere, but I’ll get to that).

Here’s my poll’s url…


In order to dynamically put this poll on a webpage the readme script directed me to perform the following…

README[tt]
The filename packaged w/ this script named 'poll_it_ssi.cgi' is the CGI Script used w/ SSI (Server Side Includes) to import your poll on an existing web page.

To use SSI within HTML files, most servers require your web page name to have an *.shtml extension rather than *.html. This allows you to execute a command to include a CGI Output in your html file.

Now to input the poll_it_ssi.cgi script into an HTML page, use this code (After finding out what you need to use for SSI calls from the above explanation):
<!--#exec.cgi=&quot;cgi-bin/poll_it_ssi.cgi&quot;-->[/tt]

I inserted the script above into an .shtml file, so I could view the poll in a webpage, but I received an error.

Here’s the error…

[tt][an error occurred while processing this directive][/tt]

Here’s my url…


I tried another ssi script (date script) to make sure I was doing the .shtml thing correctly and received a successful output…
I inserted the following SSI into an .shtml page…

[tt]<!--#echo var=&quot;DATE_LOCAL&quot; -->[/tt]

Here were my results…



Does anyone know what I could be doing wrong?


If you’re interested, here’s the full readme doc…

If you need any more information please let me know!

Thanks,
Jenny
 
Assuming you're hosting on an Apache server, have you set up the .htaccess file to support .shtml & cgi?

EG :-
AddType text/html .shtml
AddHandler server-parsed .shtml
AddHandler cgi-script .cgi

HTH
 
Hi,

Well, I don't run the Apache server on my system. The company I put my site on does all that stuff.

Do I have to upload the .htaccess file to my or cgi-bin?

Thanks,
Jenny
 
hey i might sound silly for even asking you this, but ure cgi file is in the cgi-bin folder right???...
or if that doesn't work, what if you substitute
<!--#exec.cgi=&quot;...&quot; --> with <!--#exec cmd=&quot;...&quot; -->


i don't know if that's an option but i've worked on a site that calls a pl file and it has exec cmd instead of exec.cgi
but then again since ures is a cgi file it's prolly different..
plus that's what it says in the readme correct??

sorry for being so inquisitive...

arif
X-) s-)
 
Hiee!

My .cgi file ([tt]poll_it_ssi.cgi[/tt]) is in the cgi-bin. But my html file which has the SSI call, is in the
The following is the SSI call on my html page…

[tt]<!--#exec.cgi=&quot;cgi-bin/poll_it_ssi.cgi&quot;-->[/tt]

I’m not sure where to go from here?

Thanks for reading and responding!
Jenny
 
Hi,

first, riffy is right, you should use:
<!--#exec cgi=&quot;path/to/Poll_It_SSI.cgi&quot; --> no dot between exec and cgi.

second, many servers do not allow the #exec directive for security reason. that means that the #include, #echo, #config, #fsize and #flastmod may all work and #exec still would not work.

bye.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top