Be a Supporter!

SSI Help

  • 521 Views
  • 5 Replies
New Topic Respond to this Topic
PieStomp
PieStomp
  • Member since: Jun. 7, 2000
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
SSI Help 2001-10-08 13:13:22 Reply

I have a template file that has an include in it to an html file. This template file is opened through a cgi script. When I put the path to the template file in the address, I can see the file i'm trying to include. When I go view it through it's natural path through the cgi, I do not see the included file. Does anyone know if there is a way to fix this so I can see the file i'm trying to include??

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to SSI Help 2001-10-08 14:22:21 Reply

At 10/8/01 01:13 PM, PieStomp wrote: I have a template file that has an include in it to an html file. This template file is opened through a cgi script. When I put the path to the template file in the address, I can see the file i'm trying to include. When I go view it through it's natural path through the cgi, I do not see the included file. Does anyone know if there is a way to fix this so I can see the file i'm trying to include??

What's the error? (That usually helps diagnose the problem).

Are you including the file as the url to the file, or the actual path to the file? You should be doing the latter. If this is the cause of the problem, you'll need to find out your document root, then include the file that way, like this:

/home/username/htmldocs/script.html

as opposed to

http://www.sitename.com/script.html

Your hosting solution should be able to provide you with details of your document root.

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to SSI Help 2001-10-08 14:26:22 Reply

At 10/8/01 02:22 PM, liljim wrote:
At 10/8/01 01:13 PM, PieStomp wrote: When I go view it through it's natural path through the cgi, I do not see the included file.

Damnit,
I should quit skim reading....

Can you post some of your code, and maybe a link to the page you're having trouble with?

PieStomp
PieStomp
  • Member since: Jun. 7, 2000
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to SSI Help 2001-10-08 15:50:54 Reply

Well, my error is just that I can not view the header i'm trying to include. See, what I have is a cgi script for login. User enters name and password and logs in. Inside the cgi script I have:
$t = HTML::Template->new(filename => "welcome.tpl", die_on_bad_params => 0 );

where the .tpl file is my template and the content is populated from a database.

i have a .htaccess file that looks like this:

Options All
Options +Includes

AddType text/html .html
AddHandler server-parsed .html

AddType text/html .tpl
AddHandler server-parsed .tpl

AddType text/html .htm
AddHandler server-parsed .htm

so therefore if you view the .tpl file, the included header shows up. If I try to log in and the script loads the .tpl file, the header does not load, but the rest of the page loads correctly.

RancidScammerDude
RancidScammerDude
  • Member since: Jul. 27, 2001
  • Offline.
Forum Stats
Member
Level 12
Blank Slate
Response to SSI Help 2001-10-21 01:21:47 Reply

I would not recomend Saving a Template cause they often results in erros when loading. Just take a current source and modify that. Page Builders work pretty good.....

QwaNkerkas
QwaNkerkas
  • Member since: Sep. 23, 2001
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Response to SSI Help 2001-11-03 13:23:59 Reply

At 10/21/01 01:21 AM, Mutilated-Puppet wrote: I would not recomend Saving a Template cause they often results in erros when loading. Just take a current source and modify that. Page Builders work pretty good.....

I would have to agree with Mutilated-Puppet.