Forum Moderators: coopster & phranque

Message Too Old, No Replies

CGI include problem

error out when I included a perl script

         

tim_o_mast

9:29 pm on Apr 25, 2002 (gmt 0)



Ok here is the problem I am hosting my own site on an NT server. I got a program to include a survey on our page. The perl script works fine if I call the file from a brower. However if I include it such as <!-- include file='poll.pl' -->
it errors out. I changed the excute promissions, and add .pl to the running scripts and I use this in a .shtml file. Any Ideas what I need to change on the server to get this to run?

Key_Master

10:04 pm on Apr 25, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know how Perl runs on Windows but on a UNIX server it would look something like this:

<!--#include virtual="/path_to_file/poll.pl"-->

jatar_k

10:07 pm on Apr 25, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



welcome to webmasterworld tim_o_mast

I assume you are using apache then? with the .shtml ext

if so then it is your syntax, like so would be better

<!--#include file="poll.pl" -->

and check out this
[httpd.apache.org...]

tim_o_mast

1:10 pm on Apr 26, 2002 (gmt 0)



ok syntax is not the problem I missed type the origanal with out the # sign. I am using whatever the default shtml program with IIS 4.0 that came with Win NT.

itim

11:08 am on Apr 30, 2002 (gmt 0)



tim_o_mast, I would ask two questions.

1. Does your script prints "Content-Type: text/html\n\n" at the beggining?

2. Did you configure IIS to understans SSI directives within .shtml files?

TRACEYR

10:45 pm on Jun 27, 2002 (gmt 0)

10+ Year Member



2. Did you configure iis to understans ssi directives within .shtml files?

How do you do this bit........please...

Brett_Tabke

7:41 am on Jul 8, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Where you sure it wasn't a case of the file not being found?

If you can call the script from the browser, then you know the script is good and will work from ssi.

MCookie

9:55 pm on Jul 9, 2002 (gmt 0)

10+ Year Member



Hi..
Since it's a program, have you tried <!--#exec cgi="poll.pl" --> ?