Web Hosting Talk







View Full Version : Parse CGI for SSI !?


brands
11-17-2002, 12:50 AM
Hello,

How can i get SSI on my server to look through all the coding of my cgi files for SSI tags !

Is that done on my hosting account or does it depend on the way it is coded ??

Someone help me with this !

Cheers

Bulldog
11-17-2002, 03:27 AM
I'm confused -- are you just trying to get SSI to work or?

SSI generally needs an .shtml extension (unless you add a MIME type telling the server otherwise) and is called as follow:

<!--#include file="inc/header.html" -->

brands
11-17-2002, 04:47 AM
hello,

Thanks for your reply.

I am using this to call the file in a cgi page:

<!--#exec cgi="/ads/la_ad.cgi" -->

When i add this code, I get an error !

Do i need to add a MIME type or somethign else ??

Thanks

debug
11-17-2002, 05:54 PM
Your server have to support exec cgi

Lesli
11-18-2002, 02:40 PM
Go through this checklist:

* does your server support SSI?

if YES, then also check:
* does your server support exec CGI?

if YES, then also check:
* is your page extension *.shtml?

if YES, then try:
* use the include virtual command
<!-- include virtual="/ads/la_ad.cgi" -->
(does not work with all scripts / all server configurations - but it's something else to try)

debug
11-18-2002, 08:41 PM
You could use .htaccess to tell apache to parse every file that has execute permissions turned on regardless of the file extension. You don't have to rename your pages to .shtml to make them work. You can add the following to your .htaccess file and the SSI tags will work fine:

AddHandler server-parsed .htm
Options +Includes

Lesli
11-18-2002, 09:25 PM
debug's solution would work...however, it would also make the server work much harder. It would check every single file for includes to be parsed, irregardless of whether the file contained includes. Be cautious implementing that fix. It may not be the most effective.

debug
11-19-2002, 12:51 AM
Originally posted by living_media
it would also make the server work much harder. It would check every single file for includes to be parsed, irregardless of whether the file contained includes. Be cautious implementing that fix. It may not be the most effective.

I agree

brands
11-19-2002, 02:24 PM
Hii,

Thanks for your valuable inputs, I checking through them.

If i still can't get it work, I'll settle for using iFrames !

Thanks
Cheers

debug
11-19-2002, 05:46 PM
Originally posted by brands
Hii,

Thanks for your valuable inputs, I checking through them.

If i still can't get it work, I'll settle for using iFrames !

Thanks
Cheers

iframe is another solution. Good idea.