cgi script

Status
Not open for further replies.

lincsman

New Member
Messages
4
Reaction score
0
Points
0
Hi
I've spent about 2 days trying to run a cgi script from an html page with no luck. I've downloaded several scripts and anything that doesn't need me to call it from a page works fine so I guess I'm calling it wrong. I've tried all of the forms I can find, my html reads as:

<html>
<head>
</head>
<body>
<!--#exec cgi="/home/lincsman/public_html/cgi-bin/clock.cgi"-->
<p>
<!--#include virtual="/cgi-bin/clock.cgi" -->
<p>
<!--#include virtual="/home/lincsman/public_html/cgi-bin/clock.cgi" -->
<p>
<!--#exec cgi="/cgi-bin/clock.cgi"-->
<p>
<!--#exec cgi="/home/lincsman/public_html/cgi-bin/clock.cgi"-->
<p>
<!--#exec cgi="http://www.artworld.x10hosting.com/cgi-bin/clock.cgi"-->
<p>
<!--#exec cgi="/home/lincsman/public_html/cgi-bin/clock.cgi"-->
</body>
</html>
but http://www.artworld.x10hosting.com/clock.html produces a blank page.
If I call it from the browser bar it work:
http://www.artworld.x10hosting.com/cgi-bin/clock.cgi
or another:
http://www.artworld.x10hosting.com/cgi-bin/textclock.cgi

A script I installed to check the details confirmed:
Path and URL information:

Your path to Perl is correct
Your server is running Perl version: 5.008008
Your domain name is: www.artworld.x10hosting.com
The complete system PATH to this script is: /home/lincsman/public_html/cgi-bin/test.cgi
The URL of this script is: http://www.artworld.x10hosting.com/cgi-bin/test.cgi

Please help if you can!
Many thanks in advance.
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83

Blank, but not empty.

Try changing the extension to .shtml since you are trying to use SSI Not sure if SSI is enabled.

Edit/Add

Add folowing to .htaccess file:

Code:
Options +Includes
AddType text/html shtml
AddHandler server-parsed shtml

That will get the server to parse the file. Not sure if it will enable the "exec" tag.
 
Last edited:

lincsman

New Member
Messages
4
Reaction score
0
Points
0
Many many thanks descalzo as simple as that, you were right, I just had to change the page to shtml. How did you know that I was using ssi please?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
How did you know that I was using ssi please?

Code:
<!--#include virtual="/cgi-bin/clock.cgi" -->

and the rest are SSI directives. People don't use them much anymore.
 
Status
Not open for further replies.
Top