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
Solved

PERL and SSI

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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This video teaches users how to migrate an existing Wordpress website to a new domain.
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.

839 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