- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Apache CGI & SSI
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2007 12:02 AM
тАО11-28-2007 12:02 AM
Apache CGI & SSI
I created a html layout named mylayout in wich I include another file:
When I load mylayout into my browser, the file testrob.txt is copied into mylayout. This works fine (so I guess my apache config settings are correct).
I run a program inside a cgi script:
#!/bin/sh
echo Content-type: text/html
/mydir/myprog
Inside myprog I display mylayout. However it does NOT include the file testrob.txt when I run the cgi script from my browser.
Anyone have any idea why the include doesnтАЩt work when using a cgi script?
Thank you in advance
Rob
HP Unix 11i
Apache 1.3.19
Mozilla Firefox 2.0.0.10
Microfocus Server Express Cobol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2007 02:33 AM
тАО11-28-2007 02:33 AM
Re: Apache CGI & SSI
I would try to run the scripts "standalone" and inspect the HTML syntax.
For example, if you have some tags like
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2007 02:45 AM
тАО11-28-2007 02:45 AM
Re: Apache CGI & SSI
thank you for your reply.
The html layout I display in my program is the same layout as the one I directly "get" in my browser. So the difference is:
1. "get" the layout by enter the name in my browser address (include works)
2. "put" the (same) layout into my browser by using a program in my script (executed by enter the script name in my browser). In this case include doesn't work.
Somehow include doesn't work when I display the layout using a program.
There can't be a html error because I use exactly the same layout.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2007 02:55 AM
тАО11-28-2007 02:55 AM
Re: Apache CGI & SSI
inspect the actual HTML, and that you see the
comment ""
in there, rather than the content of
"testrob.txt", as you had hoped. (That I
need to assume anything speaks ill of your
problem description, of course.)
I know nothing, but I can _imagine_ that the
SSI work is done when Apache reads a HTML
source file. CGI script/program output may
get put out directly, and not processed in
the same way as a file which must be read,
processed, and then put out. If my
conjecture is true, then no one is trying to
interpret your "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2007 11:00 PM
тАО11-28-2007 11:00 PM
Re: Apache CGI & SSI
http://httpd.apache.org/docs/1.3/howto/ssi.html
nothing conclusive leaped right out at me,
but I'm sticking with my earlier explanation
until something better comes along.
Note that that doc does give an example of
"Including the results of a CGI program",
with which technique you might be able to
achieve the desired result in a somewhat
different way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2007 11:28 PM
тАО11-28-2007 11:28 PM
Re: Apache CGI & SSI
I haven't read your whole thread and the others' replies yet.
Also, without delving into server side includes,
I simply suspect that your CGI script violates the server's HTTP response.
The protocol demands a blank line "\r\n" or "\n" between header and body.
The path to myprog in your script follows immediately the HTTP header.
For example, take Perl's CGI to look what a valid HTTP response header should look like
(note the empty line 2 that nl depicted)
$ perl -MCGI=header -le 'print header'|nl
1 Content-Type: text/html; charset=ISO-8859-1
2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2007 12:04 AM
тАО11-29-2007 12:04 AM
Re: Apache CGI & SSI
According to someone in the apache forum I have to upgrade to Apache 2.0 and use the apache mod_include module to set up an output filter for SSI.
Thank you for your feedback!
Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2007 05:42 AM
тАО11-29-2007 05:42 AM
Re: Apache CGI & SSI
> use the apache mod_include module [...]
Presumably, you needed to enable mod_include
in 1.3.x, too, or else no "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2007 05:57 AM
тАО11-29-2007 05:57 AM
Re: Apache CGI & SSI
#!/usr/bin/tclsh
puts "Content-type:text/html\n\n"
...
Note the two "\n\n"!
You need to add new lines too.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
