PDA

View Full Version : How to call SSI from a Tera-Byte Server?


Chazhound
01-27-2001, 05:50 PM
Hi all,
I have had to edit over 100 pages everytime I update my picture gallery because I cannot get server side includes to work with my tera-byte shared server.

Can someone please show me how you do it?

I have no problem calling from the web directory or root directory, but I cannot call anything from the cgi-bin.
I tried another script today just to ensure it wasn't my script and the problem was dupicated.

Yes, I checked all permissions, paths, and uploaded in correct format and such.

Here is what should work:
I am trying to use a call like this:
<!--#include virtual="/cgi-bin/pictures/potd_thumbnail.pl" -->
I even tried:
<!--#include virtual="cgi-bin/pictures/potd_thumbnail.pl" -->
<!--#exec cgi="/cgi-bin/pictures/potd_thumbnail.pl" -->
and all the variations....

Even tried full paths using both "site#" and
"www.funnypostcard.com" user names.

Nothing works! I have never seen nothing like it http://geekvillage.com/ubb/frown.gif

Thanks for your insight...
Chazhound http://www.FunnyPostcard.com
Test page is at: http://www.FunnyPostcard.com/index.htm

notibrian
01-27-2001, 06:15 PM
i have all my perl scripts in my root directory and after renaming all files to .shtml ... everything works fine in all directories.

maybe ssi/prel script doesn't work under /cgi-bin/ ? try puting the script on your root directory and see how it works and don't for get to rename to .shtml.

good luck pal http://geekvillage.com/ubb/smile.gif

Chazhound
01-27-2001, 07:13 PM
Thanks notibrian,

Gee, I really don't want to run all my scripts from the root.
I have this script running on two other hosts just fine using calls from the cgi bin.

I emailed tera-byte for help. Hopefully it is a problem with them.
If not I guess I'll have to get an expert http://geekvillage.com/ubb/frown.gif

Chazhound http://www.FunnyPostcard.com

Steve_S
01-28-2001, 09:53 AM
Scripts should NEVER be run from the public directory. It's a serious security risk. I think your pages are all .html so I think the following will do it.


1) Create or edit your .htaccess so it contains all of this:

Options +ExecCGI
AddHandler cgi-script .cgi
AddHandler cgi-script .pl

AddHandler server-parsed .html .htm .shtml

ErrorDocument 400 /error.html
ErrorDocument 403 /error.html
ErrorDocument 404 /error.html
ErrorDocument 500 /error.html

Permissions are 777 and to see it via Telnet it's:

ls -al

Create an error.html with a meta refresh if you wish or links.


2) Edit your includes and exec commands. REMOVE the space after the last quote. Like this:

<!--#exec cgi="/cgi-bin/todaysdate.cgi"-->

<!--#include virtual="/top_menu.html"-->

HTH

------------------
Best Regards,
Steve_S
Your Administrator
FREE Ecards for your site. (http://geekvillage.com/ecards/) Your pages and images = $$$ Tons of features. We host the script. The easy way (http://www.geekvillage.com/cgi-bin/popular/geekvillage_popular.cgi) to learn who links to your site in the major engines.

notibrian
01-28-2001, 10:00 AM
thanks steve for your advice ... i think i better move all my perl/php scripts in a new directory ... anyway, do i have to set anything to the directory(e.g. /cgi/)?

Click Here!