Solved

Calling .pl from <!--include exec...-->

Posted on 1997-11-12
15
232 Views
Last Modified: 2013-11-18
I am running NT4.0, IIS 3.0, and need to call a .pl from an include line, I went through the registry and found nothing wrong, but the browser is still ignoring the SSI.  HELP!
0
Comment
Question by:mgfranz
[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
15 Comments
 
LVL 1

Expert Comment

by:mortenmo
ID: 1208573
<!--#include exec="program" --> is something the server has to
accept and not the browser. the <!--#include ..> never reaches
the browser (or shouldn't at least).

I don't know about the web-server you got, but make sure it at
all have SSI (server side include) support (many servers doesn't
or they have another way of including).
Mark tho that it is normally <!--#include not <!--include.. in
the question you forgot the # (hash).
Next is, that if you want to execute a command, you don't use
#include, but you use #exec try <!--#exec cmd="a.pl" ..

Hope this helps

 

0
 
LVL 18

Author Comment

by:mgfranz
ID: 1208574
As I stated in my original Q, I am running IIS 3.0 on a NT4.0 server, I am able to run .pl scripts from a <frameset> page, but not from a SSI, this issue is the same on a PWS also, Here is what I am trying to do;

----------------------------------

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;>
<TITLE>Doc2</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ffffff">
<!--#include cmd="\cgi-bin\countdown.pl" -->
<P></P></BODY>
</HTML>

I have tried <!-- #exec cgi="....pl --> and <!--#exec cmd... -->
also, I dont have access to other server types.

IIS should not be this difficult to set-up for SSI!
0
 

Expert Comment

by:bizsystems
ID: 1208575
The httpd server daemon probably needs a mime type designated
as acceptable as an executable.  I am unfamiliar with what runs
on windoze. But in the unix world, this would go into
the httpd.conf file.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 18

Author Comment

by:mgfranz
ID: 1208576
NT and IIS dosn't use a HTTPD.CONF file, or any real config file, only registry entries.  After much research and many e-mails from various sources, it has been determined that IIS and NT does not recognize <!--#exec ...--> includes fromm HTML files, ... but, with ASP pages, there are certain includes that will run, with much registry work.  I ended up writing a perl file that opened up the tables inside of the script, like a "auto-generate".
0
 
LVL 1

Expert Comment

by:maholt
ID: 1208577
I had trouble getting nt to run perl scripts.  And yes, NT can be that hard to get perl to run.  Check your registry.  Make sure ...
HKEY_LOCAL_MACHINE on Local Machine
    SYSTEM
         CurrentControlSet
              Services
                   W3SVC
                        Parameters
                             ScriptMap
has a field like
.pl:REG_SZ:c:\ntperl\bin\perl.exe %s

You could also try making a runit.bat file that is
    perl c:\counter\count.pl

Good luck
0
 
LVL 18

Author Comment

by:mgfranz
ID: 1208578
Perl scripts run fine, but it would be nice if we could run <include...> lines from inside of a print << statement.  What I have found out so far is that IIS has no <include exec...> capabilities unless you are running ASP.  Which would mean re-writing about 100 pages... :-(
0
 
LVL 84

Expert Comment

by:ozo
ID: 1208579
print <<HERE;
<include>@{[`\cgi-bin\countdown.pl`]}</include>
HERE

0
 
LVL 1

Expert Comment

by:nanullnet
ID: 1208580
The default file mapping for SSIs on IIS3.0 is .stm,  Change the name of your html file from whatever.html to whatever.stm, and it will probably work.
0
 
LVL 18

Author Comment

by:mgfranz
ID: 1208581
nope, OZO hit the nail on the head...
0
 
LVL 84

Accepted Solution

by:
ozo earned 50 total points
ID: 1208582
In that case, here's an Answer:
print <<HERE;
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;>
<TITLE>Doc2</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#ffffff">
${\(`\cgi-bin\countdown.pl`)}
<P></P></BODY>
</HTML>
HERE

0
 
LVL 84

Expert Comment

by:ozo
ID: 1208583
If it didn't hit the nail on the head, you could have rejected it for another answer.
0
 
LVL 18

Author Comment

by:mgfranz
ID: 1208584
nope, this is ~almost exactly what I was looking for, either way, this actually works better than my original, cause I can put all my script into the same page.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1208585
Then why the low grade?  One might think you were dissatisfied in some way.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1208586
Actually, there is a problem with the answer as given,
It should have been `/cgi-bin/countdown.pl`, or else `\\\\cgi-bin\\\\countdown.pl`
0
 
LVL 84

Expert Comment

by:ozo
ID: 1208587
And with the ${\(...)} construct, you would have wanted ${\(scalar `command`)}
if command returns more than one line
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to silent print from safari browser 6 324
Using YubiKey with REST API application 2 150
Show tab when enter div and change underline color 3 125
octal error in perl program 3 42
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

734 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