FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-25-1998, 04:52 PM   Postid: 14961
Lari
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 1998
Location: Finland
Posts: 2
CGI-output and SSI

I have a cgi-script that produces html-pages which contain some SSI-commands. I have used similar scripts in other servers where they have worked. However, Futurequests server parses only files ending with .shtml, and not the html that comes as an output of a cgi-script.

Is there any way to make the server to parse also cgi-output, or do I have to find some other way to get the output I want?



Lari is offline   Reply With Quote
Old 11-25-1998, 05:04 PM   Postid: 14962
Del
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 1998
Location: San Bernardino, CA, USA
Posts: 367
That's a good question. According to Apache docs, it is not possible to have server parsed output from a cgi script. However, I too have been on a server that did it (Hypermart), but they won't tell their secret about how they did it... I'm really not sure if Terra has set stuff up this way or not.

Since that didn't answer your question, I can offer only a suggestion that probably won't work anyway. Instead of having the script print "Content-type: text/html\n\n", try using "Content-type: text/x-server-parsed-html\n\n" No promises as to whether or not that will work at all though.

Sorry I can't be of more assistance.

Del
Del is offline   Reply With Quote
Old 11-25-1998, 05:43 PM   Postid: 14963
Lari
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 1998
Location: Finland
Posts: 2
I already tried to change content-type to x-server-parsed-html, but as you guessed, it didn't work. I also tried to change it to x-server-parsed-html3, as some document somewhere suggested, but it produced funny results - my browser started RealPlayer, which started to search for some plugin..

Thank you anyway for your answer. I guess I'll just have to find some other way to create the output that I want.


Lari
Lari is offline   Reply With Quote
Old 11-25-1998, 06:06 PM   Postid: 14964
 Terra
CTO FutureQuest, Inc.
 
Terra's Avatar
 
Join Date: Jun 1998
Location: Z'ha'dum
Posts: 7,678
Hmmm, Interesting proposition... I know how to do it externally, but not internally to the Apache engine...

CGI --> /www/tmp/343893.shtml (write random file)
___|--> redirect -> /www/tmp/343893.shtml --|
_________________________client browser <--|

This is what I used on the Apache 1.2.x series of servers...

I see 3 options internally
1) internal mod_rewrite with it's output piped and restacked for the SSI handling module
2) internal CGI --> SSI handler (somehow connect/bridge the 2 together)
3) mod_perl should allow me to hook the CGI API and SSI handlers forming a pipelined bridge... (variation of #2)

CGI --> mod_perl API hooks --> SSI (with traps to stop looping)

These are all speculative, and would take me some time to figure out the correct 'voodoo' necessary to do such a thing...

Del, the 'content-type' *may* also work as well, if they have changed the dynamic handling (1.2.x --> 1.3.x)... It just seems *too* easy... :p Haven't had time to test it though -- got my hands full with the new server...

--
Andrew Gillespie
Engine Designer/Tuner
FutureQuest.net

(In other words: I need to research this...)


[This message has been edited by ccTech (edited 11-25-98).]
Terra is offline   Reply With Quote
Old 11-25-1998, 06:53 PM   Postid: 14965
Del
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 1998
Location: San Bernardino, CA, USA
Posts: 367
Hypermart seems very closed-minded about sharing their secret of how they pulled it off. There have been many people tried to get the answer from them with no success. HM also parses every html document served, that's how they run their banner system. I'm sure that's part of their trick in getting ssi to work in dynamic output.

I'm still trying to get SSI to work at all on my local server (apache 1.3.? for win32). So far all I get is the [--an error occurred--] thing, which doesn't help any. I've still got tons to learn about the internal workings of Apache, so I'm of very little help in these matters. Even if I do figure anything out, it's on the Win32 system, and prolly won't apply to the real Apache I bet...

Have fun with the new box I take it your part finally showed up? I saw Deb's post that it should have arrived this morning.

Del
Del is offline   Reply With Quote
Old 11-25-1998, 07:15 PM   Postid: 14966
 Deb
FutureQuest, Inc.
 
Deb's Avatar
 
Join Date: Jun 1998
Location: Franktown Colorado
Posts: 6,781
Yes, the part came in and he's off putting all the pieces together

Plan on downtime tonight for a GREAT REASON!!!

as for the everything concerning SSI/CGI I will keep my mouth shut and await Terra's research and what you guys come up with..it's not my specialty eheh

Deb
Deb is offline   Reply With Quote
Old 11-25-1998, 07:21 PM   Postid: 14967
Del
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Nov 1998
Location: San Bernardino, CA, USA
Posts: 367
Gruvy

Del
Del is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:24 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.