can't execute a CGI/perl script

Hi, I made a perl script and saved it as cgi-bin/ and this is what it contains:

print "Content-Type: text/html\n\n";
print "hello";

I then made an shtml file and saved it in my home directory as temp.shtml and this is what it contains:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">



<!--#exec cgi=""-->


but when I try to open the page I get an error processing directive.  Any ideas?  Yes I know the first line of the script is not #!/usr/bin/perl or whatever, but that is because it is not required for tripod.  I am able to use <!--#include virtual = "filename" --> so as far as I know <!-- #exec cgi = "filename" --> should work.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

you probably dont have execute permissions. also the file will need to be set for execute using chmod
1. is your script running from command-line?
2. is your web-server configured to allow #exec in SSI?

Please post complete error message.
In many servers the "Exec" option for SSI is turned off due to security reasons. You might want to verufy whether server is allowed to run "EXEC CGI".
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

<!--#include virtual="..."--> should be enough to do what you want.

Most webhosts don't allow extended SSI (inculding the "exec" include) because it can allow people to wreak havoc with the server. This is even true of such hosts as which is primarily for amateur developers and students writing programs etc so I'm sure tripod won't let you do it, as it's a much more commercial offering.
niltzAuthor Commented:
The file has execute permissions.  If you run the script by entering it will work, but if you go to then I get the following error:
[an error occurred while processing this directive]

You can see for yourselves by just going to the links.

If I am unable to use <!--#exec cgi="filename"--> then how do I use <!--#include virtual="filename"--> to get the same results?  When I use it I just get the contents of my script being displayed and not the output that the script would generate.  What I want to end up doing is creating a script to generate random quotes and then call this script from a shtml file.  I don't see any other way of doing it other than using <!--exec cgi="..."-->, but then again I am new to CGI so maybe there is a way around it.
You can try using
(for IE)
( for Netscape)

instead of "EXEC CGI"
using an "include virtual" directive should produce the right result if it's used correctly, unless perhaps it's been disabled by the server owners in which case your best bet is to find a better host.  If you're in the UK try
niltzAuthor Commented:
I don't think "include virtual" is disabled because there are sample scripts that tripod gives us to use and the way we execute them is with a "include virtual" statement.

I would rather stay away from IFRAME and LAYER since I want this to work on all browsers and not just IE or Netscape.
I know it says tripod doesn't need them, how about trying to put the shebang line in at the top? Or do tripod not tell you where Perl is on the server?
niltzAuthor Commented:
Tripod doesn't tell us where Perl is.  I have tried putting #!usr/bin/perl at the top anyway but it doesn't help.

When I try to use "include virtual" does my script need to contain anything special?  Or is what I posted at the top fine?
you have little chance to find the reason if you haveno accessto the web-servers error-log,
Ask the admin to give the detailed error messages, or you just can guessing ..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Try #!usr/local/bin/perl

I really suggest you try a new host, like or - both of whom allow you access to your error logs AND let you know where Perl is. (They also have confirmed support for SSI)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.