Solved

PERL and SSI

Posted on 2004-10-02
4
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

631 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