Skip to main content
gamedev.net
🔒 Locked

[web] CGI script problem! Help!

Started by PixolMaster 1 reply 900+ views
Original Post
PixolMaster
PixolMaster
Hi, I'm having a problem with a random html script... I had an earlier website which had a frameset with three frames (left column, right column and middle). The right column's source looked like so:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<!--#exec cmd="cgi-bin/randhtml.cgi"-->
</body> </html>
The line calling the randhtml CGI script randomly picks from a list of HTML, adding a random image each time the page is refreshed. All is well there. Here's the problem, though... I'm redesigning the site to eliminate the evil plague known as frames. I'm now using tables for layout... I put the exact same cgi command in the right column of the table, but when I view the page I get nothing... no image, and the command is eliminated from the page. The part of the page that contains the cgi script call is here:

<td valign="top" width="17%" align="left"> 
      
<!--#exec cmd="http://www.write-pub.com/cgi-bin/randhtml.cgi"-->
</td>
The page is saved as a .shtml page, which I believe is correct. Is there something I'm doing wrong, or some reason that it shouldn't work in this situation? Thanks for your time... I'm totally stumped.
Shadowdancer
Shadowdancer
I haven't touched SSI for a long time, but shouldn't you give a server-side (relative or absolute) path to the script instead of an URL reference?

!--#exec cmd="http://www.write-pub.com/cgi-bin/randhtml.cgi"--

should rather be
!--#exec cmd="wherever_the_cgi_dir_is_relative_to_html_code/cgi-bin/randhtml.cgi"--

or an absolute path
!--#exec cmd="/rootdir/of/web/presence/cgi-bin/randhtml.cgi"--


Multiple edits: Goddamn forum eats bracket entities in code sections, so I removed the brackets altogether.
PixolMaster
PixolMaster
Quote:
Original post by Shadowdancer
I haven't touched SSI for a long time, but shouldn't you give a server-side (relative or absolute) path to the script instead of an URL reference?

*various examples removed*


I tried that, too. No difference at all... I don't see why it isn't working! It's driving me mad.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.