View Full Version : Ssi

07-14-2002, 10:04 PM
I was just wondering how you turn on server side includes with a perl script....I am going to be using some CGI stuff, and I think thats why its not working....


07-14-2002, 11:26 PM
Hmm, what are you trying to do here exactly? What's not working?

If you wanted a CGI script that could toggle the ability to parse files for SSIs that's easy enough, but I'm not sure that that's what you're after here...

I'm a bit confused :confused:.

07-14-2002, 11:40 PM
well, i tried installing a few different CGI scripts for various things, and none of them worked. i followed the instructions to a "t" some of them said to make sure that i had server side includes turned on, that my host needs to do that. well, thats the only thing i can think of as the problem....

07-15-2002, 05:32 AM
Well, if you are on a free host, and some pay hosts, you cant turn them on, the system administrator has to do that, else if you are running locally on your computer, you can turn them on, with httpd.conf, if you are on apache,

and the scripts should work even with ssi off, chekc the code and other things, as the path to perl, the file permission andthe way it was uploaded, has to be in ascii mode


07-15-2002, 06:50 PM
Most hosts require that you name your pages with a .shtml extension in order to use SSI.

You don't necessarily need root or superuser access to your box in order to enable SSI, you can do it via htaccess : http://javascriptkit.com/howto/htaccess4.shtml

However, try renaming your page to shtml first, and make sure (if you are doing an SSI EXEC) that it goes like this

<!--#exec cgi="/cgi-bin/path/filename.pl" -->

Notice the space between the last quote and the second-to-last dash, it's important.

If you are just including files (which it doesn't sound like), then you should try:

<!--#include file="filename.ext" --> for files in same directory
<!--#include virtual="/path/from/root/to/dir/filename.ext" --> files specificed from one directory across entire site.

07-16-2002, 12:27 AM
I just want to say thanks up front to anyone who can help me with this.

I'm trying to install the poll_it cgi script on my page. Everything is installed and working (if I type in the path to the script in the address bar it runs) but I now want to set it up to use the ssi script it came with so the output of the poll will be sent to my html document.

In the body of my webpage, do I just need to insert the line

<!--#exec cgi="/cgi-bin/path/filename.pl" -->

and where ever that line is, the poll will be generated on the page? I tried that, and where the poll should be, I get... [an error occurred while processing this directive]. I then tried renaming the .html file to .shtml but got the same error.

Also, since the .html file is in one directory, and the cgi script in in the cgi-bin, do I need to put a .htaccess file in both directories or just the directory where the .html files are.

Lastly, I found on the web that the .htaccess should look like this...
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

But the instructions with the script say to just add this one line...
AddType text/x-server-parsed-html .html

Which is the right way?


07-19-2002, 09:30 PM
Just wanted to say thanks to everyone who responded!!:thumbsup:

You guys are the greatest!!!:thumbsup: :thumbsup: :thumbsup:

What a great resource!!!!:thumbsup: :thumbsup: :thumbsup: :thumbsup: