Faceless CGI: force output to be interpreted by Apache
Sannyasin Sivakatirswami
katir at hindu.org
Mon Nov 17 15:08:13 EST 2003
Alex: thanks for focusing on this a bit...
Whether the SSI is" include" or "exec" seems not to be the issue. The
issue seems to be that Apache doesn't parse (and trigger the associated
module) anything that is sent out the pipe to stnOut by the Rev CGI.
If we put into a browser:
www.himalayanacademy.com/forms/dynamicallyBuiltwSSI.html
where "dynamicallyBuiltwSSI.html"
has both includes and exec's, (for header's and footers, side bar links
chunks etc) Apache will parse and run those SSI's as expected and send
the document back to the browser with the expected chunks inserted.
on the other hand
on startUp ## highly simplified for this email
put url "file:forms/dynamicallyBuiltwSSI.html" into tResponseToUserFile
## do stuff here, replace strings with the users's name,
## insert his choices from a shopping cart form etc.
put "Content-Type: text/html" & cr
put "Content-Length:" && the length of tResponseToUserFile & cr & cr
put tResponseToUserFile
end startUp
the user will see all the raw strings
<-- exec virtual "/cgi-bin/whatever.cgi" --!>
in his browser. i.e. the stndOut from the Rev CGI goes straight out
port 80 without Apache's help (Apache doesn't parse it), as far as I
can tell. Just guessing of course, all we know is the SSI's are not
implemented.
Sannyasin Sivakatirswami
Himalayan Academy Publications
at Kauai's Hindu Monastery
katir at hindu.org
www.HimalayanAcademy.com,
www.HinduismToday.com
www.Gurudeva.org
www.Hindu.org
On Nov 16, 2003, at 6:59 PM, Alex Rice wrote:
>
> On Nov 16, 2003, at 8:11 PM, Sannyasin Sivakatirswami wrote:
>
>> Problem: stnOut from an xTalk CGI script is not parsed by apache..
>> there or the SSI calls to apache's "include" module are not
>> triggered.
>
> How have you come to this determination, and what are the SSI calls
> you are making? I think the SSI exec command is what you want, not SSI
> include command.
>
> I've never used SSI and CGI together, but my old O'Reilly CGI
> programming book has an example showing this form of the command:
> <!--#exec cgi="/cgi-bin/random.pl"-->
>
> There is no reason it wouldn't work with a Rev script instead of a
> Perl script.
>
> BTW I seem to remember SSI exec might often be disabled in web server
> configurations for security reasons. Not sure about that though.
>
> Alex Rice <alex at mindlube.com> | Mindlube Software |
> <http://mindlube.com>
>
> what a waste of thumbs that are opposable
> to make machines that are disposable -Ani DiFranco
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list