why does this script not run?

C

code_wrong

hi,
I want to run a hit counter perl script when the page is loaded.
I am testing the procedure with this page:

<HTML>
<HEAD>
</HEAD>
<BODY>
<!--#exec cgi="../cgi-bin/hello.pl"-->

etc etc...

I can invoke this script from a link on a page but it does not execute when
I access the page.
I am roughly following this page:
http://www.comptechdoc.org/independent/web/cgi/perlmanual/perlhit.html

when I change the file to shtml from html I get an error message .'.failed
to process'
I understand that changing to SHTML from HTML is optional ..
When I accesss the page with the HTML extension the exec line is ignored
any ideas...comments?
cheeers
cw
 
D

David Dorward

code_wrong said:
<!--#exec cgi="../cgi-bin/hello.pl"-->
when I change the file to shtml from html I get an error message .'.failed
to process'

Which suggests that something went wrong when trying to run the script. What
does your server's error log say?
I understand that changing to SHTML from HTML is optional ..
When I accesss the page with the HTML extension the exec line is ignored

The file extension isn't relevant in of itself, but your server sounds like
it is configured to look for SSI directives in files with .shtml file
extensions, but not .html file extensions. You could reconfigure your
server instead of using a file with a .shtml extension.
 
C

code_wrong

David Dorward said:
Which suggests that something went wrong when trying to run the script.
What
does your server's error log say?


The file extension isn't relevant in of itself, but your server sounds
like
it is configured to look for SSI directives in files with .shtml file
extensions, but not .html file extensions. You could reconfigure your
server instead of using a file with a .shtml extension.

thanks for replying
The server is my host's .. I don't have access to the logs and can't
configure it.. I know that it is running windows of some sort ...but have
yet to find any tutorials or specifications outlining which SSI I can use
and how .... it's a puzzle ... the book I am reading - CGI and Perl in Easy
steps provides an example of a hit counter but fails to mention how it
should be invoked ... ...
regards
cw
 
C

code_wrong

David Dorward said:
Which suggests that something went wrong when trying to run the script.
What
does your server's error log say?


The file extension isn't relevant in of itself, but your server sounds
like
it is configured to look for SSI directives in files with .shtml file
extensions, but not .html file extensions. You could reconfigure your
server instead of using a file with a .shtml extension.

when I change my filename to index.shtml the error messsage is:
Failed to execute CGI : Win32 Error Code = 3
 
C

code_wrong

David Dorward said:
Which suggests that something went wrong when trying to run the script.
What
does your server's error log say?


The file extension isn't relevant in of itself, but your server sounds
like
it is configured to look for SSI directives in files with .shtml file
extensions, but not .html file extensions. You could reconfigure your
server instead of using a file with a .shtml extension.

Ah .. got it ..... my path was wrong ... instead of
<!--#exec cgi="../cgi-bin/hello.pl"-->
I needed
<!--#exec cgi="/cgi-bin/hello.pl"-->

good enough for me
cheerss
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top