Solved

PERL and SSI

Posted on 2004-10-02
4
307 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DNS, website, godaddy 6 77
Connect MySql database to wordpress site 3 54
Fixed div within Bootstrap carousel item 11 54
SQL to update characters in table column 6 94
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.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

920 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

15 Experts available now in Live!

Get 1:1 Help Now