Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Ssi

  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ssi

    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....

    thanks

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    London, UK
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 .

  • #3
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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....

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mex
    Posts
    122
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    Calilo

  • #5
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    403
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    Code:
    <!--#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:

    Code:
    <!--#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.
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society

  • #6
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    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?

    Thanks!

  • #7
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up THANKS!!

    Just wanted to say thanks to everyone who responded!!

    You guys are the greatest!!!

    What a great resource!!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •