Solved

PERL and SSI

Posted on 2004-10-02
4
306 Views
Last Modified: 2013-11-18
Ok, first of all, let me start off by saying that I am a front end designer and have very little programming knowledge.  So please answer me in dummy terms.

What I am using,
WinXP Pro, IIS, PERL installed

This page here works fine on its own, http://mp3nmore.com/cgi-bin/review/stars.pl

But when I try to add it to add that file via SSI into this page, http://mp3nmore.com/hi.shtml

It comes up as one big block of code as you can see, even though if I directly linked to that page it works fine.

What am I doing wrong????

This is the code on the hi.shtml page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>

<body>
<!--#include virtual="/cgi-bin/review/stars.pl" -->

</body>
</html>


0
Comment
Question by:krymp
4 Comments
 
LVL 13

Assisted Solution

by:StormyWaters
StormyWaters earned 25 total points
ID: 12209771
I _think_ you can do it like this:
<!--#exec cgi="/cgi-bin/review/stars.pl"-->

But I'm not sure, as I don't use CGI, thus this is untested.
0
 
LVL 16

Expert Comment

by:Sohel Rana
ID: 12210338
Hi:

Here is a step by step tutorial about how to call a SSI tag via cgi perl script  :


http://cpan.uwinnipeg.ca/htdocs/CGI-SSI/CGI/SSI.html

rsdn
0
 
LVL 5

Accepted Solution

by:
ITcrow earned 100 total points
ID: 12210756
Both the following are correct, if the server is apache.
<!--#include virtual="/cgi-bin/review/stars.pl" -->
or
<!--#exec cgi="/cgi-bin/review/stars.pl"-->

Now the reason, why your SSI is giving you wrong result is:
- Your CGI is included as text.
- Your CGI is not accepted as a CGI script.

IIS has it's own share of bugs, when it comes to SSI.

Try using:
<!--#exec cgi="/cgi-bin/review/stars.pl"-->
<!--#exec cgi="/cgi-bin/review/stars.cgi"-->
<!--#exec cmd="c:\perl\bin\perl c:/path/to/cgi-bin/review/stars.pl"-->

There are also known bug reports at microsoft site confirming IIS SSI problems.
0
 

Author Comment

by:krymp
ID: 12211130
Thanks everybody, this works: <!--#exec cgi="/cgi-bin/review/stars.pl"-->

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now