Need help with a Server Side Include

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
Hi guys, I'm building a site for a buddy of mine and I'm putting in a random picture generator on the front page since he is a photographer.

Now for some reason dreamweaver won't let me do a server side include in the bordered center table on this site Text

If someone could put one in and post the code on here that would be great.

the script is located in the cgi-bin/random.cgi
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I don't get it, are you expecting dreamweaver to run a cgi script while you test? Also, what does your script output? If your list of candidate photos is static I think this would be easier done with javascript.
 

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
Originally posted by: kamper
I don't get it, are you expecting dreamweaver to run a cgi script while you test? Also, what does your script output? If your list of candidate photos is static I think this would be easier done with javascript.

No I don't expect dreamweaver to execute it, but when this page is uploaded to the site the script should execute, grab the picture and import it into the page, thats what SSI's do.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
you can't use an SSI include statement to include a cgi script, you have to use the exec command

 

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
this is getting REALLY lame, I put that code in, still nothing, i am not even sure if it's executing because there is no broken picture image either.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
i meant use the absolute path and the real cgi script name

also, change the exension of the index page to .shtml (instead of html)
SSI isn't even being parsed for html documents on the server you linked, if its enabled at all, it will most likely be enabled on .shtml files

once its a .shtml, look at the source code in the browser, if you can find the SSI code in the source, SSI isn't being parsed
 

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
hmm I changed it to SHTML and used the absolute path as I can determine (They don't give me the absolute path to my site on here and the support team isn't online right now.

I get [there is an error processing this directive]
 

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
I got it to work, it is a virtual server include. not an execute.
 

troytime

Golden Member
Jan 3, 2006
1,996
1
0
looks like the most typical SSI configuration is different than it used to be
been about 5 years since i've used anything SSI
 

RbSX

Diamond Member
Jan 18, 2002
8,351
1
76
Yeah I was confused w hen you said that, it's been a few years since I've done an SSI too, but last time I didn't have to use the absolute path. :confused:
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: RyanSengara
Originally posted by: kamper
I don't get it, are you expecting dreamweaver to run a cgi script while you test? Also, what does your script output? If your list of candidate photos is static I think this would be easier done with javascript.

No I don't expect dreamweaver to execute it, but when this page is uploaded to the site the script should execute, grab the picture and import it into the page, thats what SSI's do.
I know what SSIs do. You just presented your problem in a rather confusing way (the webserver is what gave you problems, not Dreamweaver). Plus, you're not 'importing the picture', you're importing a bit of text that tells a browser where to find a picture. But anyway, I'm just trolling now as you have it worked out...