The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Problem in SSI configuration
vidya
post Apr 11 2007, 06:48 AM
Post #1





Group: Members
Posts: 2
Joined: 11-April 07
Member No.: 2,486



hello,

I have configured SSI in following ways.
1. AddType text/x-server-parsed-html .shtml
Options +Includes

I have add above in httpd.conf file under <DIRECTORY> section.

2. then i have save and restart my server.
3. i have created one shtml file and add following code in it
<!--#echo "hello"-->



but its not working..........
can anyone tell me where i am wrong?
Reply ASAP.........
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 11 2007, 09:17 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,403
Joined: 9-August 06
Member No.: 6



It's
CODE
AddType text/html .shtml
AddHandler server-parsed .shtml

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
vidya
post Apr 12 2007, 04:25 AM
Post #3





Group: Members
Posts: 2
Joined: 11-April 07
Member No.: 2,486



still not working
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Peter1968
post Apr 12 2007, 07:51 AM
Post #4


Serious Coder
*****

Group: Members
Posts: 448
Joined: 23-September 06
Member No.: 213



Doesn't work full stop or you get an error in this directive message?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dr Z
post Apr 12 2007, 08:05 PM
Post #5


Advanced Member
****

Group: Members
Posts: 221
Joined: 23-August 06
Member No.: 11



iI do not know if you are running Apache in your server or in your Pc under Windows. If I was to assume that it is on your server, I will recommend the the following test:

In your config file, add the following lines:
AddHandler server-parsed .html
AddHandler server-parsed .htm

Create two files:
1 - test.html
2 - include.inc

In test.html file, put the the following directive:
<!--#include virtual="include.inc" -->

In the include file, insert a line reading, say:
This is a test of SSI
(No tags, what-so-ever, just a message)

Now, call up the file test.html and see if the message of include.inc file appears as a part of the the test.html file.

Please note that before writing this reply I checked my config file, but I do not use stml extension, and only use SSI for the include directive. The way my config file is set up, it works and, therefore, I recommended the above test, to see if it will solve the problem.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 12 2007, 10:40 PM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,403
Joined: 9-August 06
Member No.: 6



Yeah, right! Or just echo an environmental variable. Like
CODE
<!--#echo var="DATE_LOCAL" -->


I think no one noticed, but your echo directive is wrong.
QUOTE(vidya @ Apr 11 2007, 01:48 PM) *

<!--#echo "hello"-->


You can't echo a string that way. To do that you'd have to put it in a varaiable first. Also, there should be a space before the closing '-->'.

CODE
<!--#set var="greeting" value="hello" -->
<!--#echo var="greeting" -->

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 21st October 2019 - 05:30 AM