Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

trouble with Server Side Includes not working

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Which mods and streaming media  
Author Message
irishboyca

External


Since: Nov 18, 2003
Posts: 13



(Msg. 1) Posted: Wed Jan 21, 2004 11:13 pm
Post subject: trouble with Server Side Includes not working
Archived from groups: alt>apache>configuration (more info?)

Hello,

I have a problem, in that Server Side Includes are not being included. I
have the server set up correctly (according to the book), with

LoadModule include_module modules/mod_include.so

<VirtualHost 67.117.74.180>
ServerAdmin webmaster RemoveThis @mairhtin.com
DocumentRoot /home/sfdesignsolutions
ErrorLog /var/www/logs/testsfd.com-error.log
CustomLog /var/www/logs/testsfd.com-access.log common
ServerName mairhtin.com
ServerAlias www.mairhtin.com
Options Indexes Includes FollowSymLinks
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

AddOutputFilter INCLUDES .shtml

as presented by the book. What might I be doing wrong? Is there some
way to test if SSI is occuring, short of coding an include and not seeing
it happen?

The include statement looks like this :
<!--#include virtual="header.html" -->

and header.html exists and is fine. If I copy it into the index.shtml,
it shows up just find. But the include wont work.

Mairhtin

 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
irishboyca

External


Since: Nov 18, 2003
Posts: 13



(Msg. 2) Posted: Thu Jan 22, 2004 7:01 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Isn't ANYONE gonna try and help me? Sad



"Mairhtin O'Feannag" <irishboyca.TakeThisOut@rocketmail.com> wrote in
news:Xns94777C8DF2D27mairhtinofeannag@64.164.98.49:

 > Hello,
 >
 > I have a problem, in that Server Side Includes are not being included.
 > I have the server set up correctly (according to the book), with
 >
 > LoadModule include_module modules/mod_include.so
 >
 > <VirtualHost 67.117.74.180>
 > ServerAdmin webmaster.TakeThisOut@mairhtin.com
 > DocumentRoot /home/sfdesignsolutions
 > ErrorLog /var/www/logs/testsfd.com-error.log
 > CustomLog /var/www/logs/testsfd.com-access.log common
 > ServerName mairhtin.com
 > ServerAlias <a style='text-decoration: underline;' href="http://www.mairhtin.com" target="_blank">www.mairhtin.com</a>
 > Options Indexes Includes FollowSymLinks
 > DirectoryIndex index.php index.html index.htm index.shtml
 >
 > </VirtualHost>
 >
 > AddOutputFilter INCLUDES .shtml
 >
 > as presented by the book. What might I be doing wrong? Is there some
 > way to test if SSI is occuring, short of coding an include and not
 > seeing it happen?
 >
 > The include statement looks like this :
 > <!--#include virtual="header.html" -->
 >
 > and header.html exists and is fine. If I copy it into the
 > index.shtml, it shows up just find. But the include wont work.
 >
 > Mairhtin
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
user2348

External


Since: Jun 28, 2003
Posts: 203



(Msg. 3) Posted: Thu Jan 22, 2004 11:22 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Mairhtin O'Feannag" <irishboyca RemoveThis @rocketmail.com> wrote in message
news:Xns9477CBE1EFF6mairhtinofeannag@64.164.98.51...
 > Isn't ANYONE gonna try and help me? Sad

I'm sure plenty of people have read your post, but there is little point
posting if they have nothing to say. Your config looks fine.

So we can ask the obvious questions, you should have already tried these
things, but I'll ask them since you want someone to post something.

Do the logs show anything? Have you tried using a simpler SSI that doesn't
rely on an external file, e.g. <!--#echo var="DATE_LOCAL"--> ?

Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
irishboyca

External


Since: Nov 18, 2003
Posts: 13



(Msg. 4) Posted: Fri Jan 23, 2004 2:36 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I tried this and it doesn't work either.

Sad I'm REALLY getting frustrated.

M



"Richard Antony Burton" <richardaburton-NOSPAM-.RemoveThis@hotmail.com> wrote in
news:eLLPb.6295867$Of.997433@news.easynews.com:

 >
 > "Mairhtin O'Feannag" <irishboyca.RemoveThis@rocketmail.com> wrote in message
 > news:Xns9477CBE1EFF6mairhtinofeannag@64.164.98.51...
  >> Isn't ANYONE gonna try and help me? Sad
 >
 > I'm sure plenty of people have read your post, but there is little
 > point posting if they have nothing to say. Your config looks fine.
 >
 > So we can ask the obvious questions, you should have already tried
 > these things, but I'll ask them since you want someone to post
 > something.
 >
 > Do the logs show anything? Have you tried using a simpler SSI that
 > doesn't rely on an external file, e.g. <!--#echo var="DATE_LOCAL"--> ?
 >
 > Richard.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
user2348

External


Since: Jun 28, 2003
Posts: 203



(Msg. 5) Posted: Fri Jan 23, 2004 12:20 pm
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Mairhtin O'Feannag" <irishboyca.RemoveThis@rocketmail.com> wrote in message
news:Xns94789EF6D9CF7mairhtinofeannag@64.164.98.51...
 > I tried this and it doesn't work either.

Well the only difference I can see between your config and mine is I also
have:
AddType text/html .shtml

Perhaps this is required before mod_include will dare to modify the
contents, rather than just being used as the mime type to tell the browser.

Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
entoone

External


Since: Jan 24, 2004
Posts: 3



(Msg. 6) Posted: Sun Jan 25, 2004 1:36 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I found this on the net and it helped me.. the entire page is located at

<a style='text-decoration: underline;' href="http://www.webdevtips.com/webdevtips/developer/serverstuff/include.shtml" target="_blank">http://www.webdevtips.com/webdevtips/developer/serverstuff/include.shtml</a>

Hope this helps! -- good luck!

To Enable Server Side Includes we have to do 2 things

1. We need to let the server know that we want to use includes. Open
DRIVE:\web\Apache2\conf\httpd.conf in a text editor (one that shows line
numbers makes this part easier)
line numbers will vary depending if you follow this guide or not but the
edits should be near the line number listed.


Line 267 change
from
Options Indexes FollowSymLinks ExecCGI
to
Options Indexes FollowSymLinks ExecCGI Includes

Remove the # from lines 793 and 794
from
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

to

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml


If you have skipped the php section then you will need to also make sure
index.shtml is in the directory index line
DirectoryIndex index.html index.php index.shtml index.html.var

Save httpd.conf and restart the server (use Apache Service Monitor)

To test SSI we need to create 2 files

1.
--
<html>
<head>
<title>hello world</title>
</head>
<body>
<!--#include virtual="hello.inc"-->
</body>
</html>
--
Save it as DRIVE:\web\Apaches2\htdocs\hello.shtml

2.
--
<b>Hello World!</b>
--


Save it as DRIVE:\web\Apaches2\htdocs\hello.inc
Finally
Open your browser and type <a style='text-decoration: underline;' href="http://localhost/hello.shtml" target="_blank">http://localhost/hello.shtml</a> into the address
bar. If all has went well you should see the words Hello World! in your
browser.
You have successfully enabled SSI
"Mairhtin O'Feannag" <irishboyca DeleteThis @rocketmail.com> wrote in message
news:Xns94777C8DF2D27mairhtinofeannag@64.164.98.49...
 > Hello,
 >
 > I have a problem, in that Server Side Includes are not being included. I
 > have the server set up correctly (according to the book), with
 >
 > LoadModule include_module modules/mod_include.so
 >
 > <VirtualHost 67.117.74.180>
 > ServerAdmin webmaster DeleteThis @mairhtin.com
 > DocumentRoot /home/sfdesignsolutions
 > ErrorLog /var/www/logs/testsfd.com-error.log
 > CustomLog /var/www/logs/testsfd.com-access.log common
 > ServerName mairhtin.com
<font color=purple> > ServerAlias <a style='text-decoration: underline;' href="http://www.mairhtin.com</font" target="_blank">www.mairhtin.com</font</a>>
 > Options Indexes Includes FollowSymLinks
 > DirectoryIndex index.php index.html index.htm index.shtml
 > </VirtualHost>
 >
 > AddOutputFilter INCLUDES .shtml
 >
 > as presented by the book. What might I be doing wrong? Is there some
 > way to test if SSI is occuring, short of coding an include and not seeing
 > it happen?
 >
 > The include statement looks like this :
 > <!--#include virtual="header.html" -->
 >
 > and header.html exists and is fine. If I copy it into the index.shtml,
 > it shows up just find. But the include wont work.
 >
 > Mairhtin
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
webmaster62

External


Since: Jan 28, 2004
Posts: 3



(Msg. 7) Posted: Thu Jan 29, 2004 1:11 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It looks to me like the original problem the poster was having was
that the inlcudes were enabled for any .shtml file, but the file
included in the example was a .html file, which would not be
recognized in that configuration.

"entoone" <entoone.RemoveThis@pacbell.net> wrote in message news:<6sCQb.15437$9E7.10670@newssvr27.news.prodigy.com>...
 > I found this on the net and it helped me.. the entire page is located at
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.webdevtips.com/webdevtips/developer/serverstuff/include.shtml</font" target="_blank">http://www.webdevtips.com/webdevtips/developer/serverstuff/include.sht...lt;/fon</a>>
 >
 > Hope this helps! -- good luck!
 >
 > To Enable Server Side Includes we have to do 2 things
 >
 > 1. We need to let the server know that we want to use includes. Open
 > DRIVE:\web\Apache2\conf\httpd.conf in a text editor (one that shows line
 > numbers makes this part easier)
 > line numbers will vary depending if you follow this guide or not but the
 > edits should be near the line number listed.
 >
 >
 > Line 267 change
 > from
 > Options Indexes FollowSymLinks ExecCGI
 > to
 > Options Indexes FollowSymLinks ExecCGI Includes
 >
 > Remove the # from lines 793 and 794
 > from
 > #AddType text/html .shtml
 > #AddOutputFilter INCLUDES .shtml
 >
 > to
 >
 > AddType text/html .shtml
 > AddOutputFilter INCLUDES .shtml
 >
 >
 > If you have skipped the php section then you will need to also make sure
 > index.shtml is in the directory index line
 > DirectoryIndex index.html index.php index.shtml index.html.var
 >
 > Save httpd.conf and restart the server (use Apache Service Monitor)
 >
 > To test SSI we need to create 2 files
 >
 > 1.
 > --
 > <html>
 > <head>
 > <title>hello world</title>
 > </head>
 > <body>
 > <!--#include virtual="hello.inc"-->
 > </body>
 > </html>
 > --
 > Save it as DRIVE:\web\Apaches2\htdocs\hello.shtml
 >
 > 2.
 > --
 > <b>Hello World!</b>
 > --
 >
 >
 > Save it as DRIVE:\web\Apaches2\htdocs\hello.inc
 > Finally
 > Open your browser and type <a style='text-decoration: underline;' href="http://localhost/hello.shtml" target="_blank">http://localhost/hello.shtml</a> into the address
 > bar. If all has went well you should see the words Hello World! in your
 > browser.
 > You have successfully enabled SSI
 > "Mairhtin O'Feannag" <irishboyca.RemoveThis@rocketmail.com> wrote in message
 > news:Xns94777C8DF2D27mairhtinofeannag@64.164.98.49...
  > > Hello,
  > >
  > > I have a problem, in that Server Side Includes are not being included. I
  > > have the server set up correctly (according to the book), with
  > >
  > > LoadModule include_module modules/mod_include.so
  > >
  > > <VirtualHost 67.117.74.180>
  > > ServerAdmin webmaster.RemoveThis@mairhtin.com
  > > DocumentRoot /home/sfdesignsolutions
  > > ErrorLog /var/www/logs/testsfd.com-error.log
  > > CustomLog /var/www/logs/testsfd.com-access.log common
  > > ServerName mairhtin.com
<font color=green>  > > ServerAlias <a style='text-decoration: underline;' href="http://www.mairhtin.com</font" target="_blank">www.mairhtin.com</font</a>>
  > > Options Indexes Includes FollowSymLinks
  > > DirectoryIndex index.php index.html index.htm index.shtml
  > > </VirtualHost>
  > >
  > > AddOutputFilter INCLUDES .shtml
  > >
  > > as presented by the book. What might I be doing wrong? Is there some
  > > way to test if SSI is occuring, short of coding an include and not seeing
  > > it happen?
  > >
  > > The include statement looks like this :
  > > <!--#include virtual="header.html" -->
  > >
  > > and header.html exists and is fine. If I copy it into the index.shtml,
  > > it shows up just find. But the include wont work.
  > >
  > > Mairhtin
  > ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
irishboyca

External


Since: Nov 18, 2003
Posts: 13



(Msg. 8) Posted: Fri Jan 30, 2004 12:05 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I followed this document TO THE LETTER, and got no joy.

The log says :

[Wed Jan 28 16:15:36 2004] [error] [client 127.0.0.1] unknown directive
"inlcude" in parsed doc /var/www/html/hello.shtml


So obviously, SOMETHING is wrong.

*scratching head*

Why would it not like "include" ????

M




"entoone" <entoone RemoveThis @pacbell.net> wrote in news:6sCQb.15437$9E7.10670
@newssvr27.news.prodigy.com:

 > I found this on the net and it helped me.. the entire page is located
at
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.webdevtips.com/webdevtips/developer/serverstuff/include.shtm</font" target="_blank">http://www.webdevtips.com/webdevtips/developer/serverstuff/include.shtm</font</a>>
l
 >
 > Hope this helps! -- good luck!
 >
 > To Enable Server Side Includes we have to do 2 things
 >
 > 1. We need to let the server know that we want to use includes. Open
 > DRIVE:\web\Apache2\conf\httpd.conf in a text editor (one that shows
line
 > numbers makes this part easier)
 > line numbers will vary depending if you follow this guide or not but
the
 > edits should be near the line number listed.
 >
 >
 > Line 267 change
 > from
 > Options Indexes FollowSymLinks ExecCGI
 > to
 > Options Indexes FollowSymLinks ExecCGI Includes
 >
 > Remove the # from lines 793 and 794
 > from
 > #AddType text/html .shtml
 > #AddOutputFilter INCLUDES .shtml
 >
 > to
 >
 > AddType text/html .shtml
 > AddOutputFilter INCLUDES .shtml
 >
 >
 > If you have skipped the php section then you will need to also make
sure
 > index.shtml is in the directory index line
 > DirectoryIndex index.html index.php index.shtml index.html.var
 >
 > Save httpd.conf and restart the server (use Apache Service Monitor)
 >
 > To test SSI we need to create 2 files
 >
 > 1.
 > --
 > <html>
 > <head>
 > <title>hello world</title>
 > </head>
 > <body>
 > <!--#include virtual="hello.inc"-->
 > </body>
 > </html><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
user2348

External


Since: Jun 28, 2003
Posts: 203



(Msg. 9) Posted: Fri Jan 30, 2004 12:26 am
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Mairhtin O'Feannag" <irishboyca.TakeThisOut@rocketmail.com> wrote in message
news:Xns947F8552538AFmairhtinofeannag@64.164.98.49...

 > [Wed Jan 28 16:15:36 2004] [error] [client 127.0.0.1] unknown directive
 > "inlcude" in parsed doc /var/www/html/hello.shtml

Did you copy and paste this log entry, or type it? If you copied it take a
closer look and see if you can see spot the problem.

Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
irishboyca

External


Since: Nov 18, 2003
Posts: 13



(Msg. 10) Posted: Fri Jan 30, 2004 10:43 pm
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

PLEASE...

NO SUSPENSE!!!! Smile

I cut and pasted it. But I'm staring at it and cannot see the problem.

PLEASE TELL ME!!!!!!!!

Mairhtin



"Richard Antony Burton" <richardaburton-NOSPAM- DeleteThis @hotmail.com> wrote in
news:RTeSb.7010234$Of.1123194@news.easynews.com:

 >
 > "Mairhtin O'Feannag" <irishboyca DeleteThis @rocketmail.com> wrote in message
 > news:Xns947F8552538AFmairhtinofeannag@64.164.98.49...
 >
  >> [Wed Jan 28 16:15:36 2004] [error] [client 127.0.0.1] unknown
  >> directive "inlcude" in parsed doc /var/www/html/hello.shtml
 >
 > Did you copy and paste this log entry, or type it? If you copied it
 > take a closer look and see if you can see spot the problem.
 >
 > Richard.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
irishboyca

External


Since: Nov 18, 2003
Posts: 13



(Msg. 11) Posted: Fri Jan 30, 2004 10:44 pm
Post subject: Re: trouble with Server Side Includes not working [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

DOH!

Inlcude !!!!

Lemmie change it and test

M



"Richard Antony Burton" <richardaburton-NOSPAM-.TakeThisOut@hotmail.com> wrote in
news:RTeSb.7010234$Of.1123194@news.easynews.com:

 >
 > "Mairhtin O'Feannag" <irishboyca.TakeThisOut@rocketmail.com> wrote in message
 > news:Xns947F8552538AFmairhtinofeannag@64.164.98.49...
 >
  >> [Wed Jan 28 16:15:36 2004] [error] [client 127.0.0.1] unknown
  >> directive "inlcude" in parsed doc /var/www/html/hello.shtml
 >
 > Did you copy and paste this log entry, or type it? If you copied it
 > take a closer look and see if you can see spot the problem.
 >
 > Richard.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: trouble with Server Side Includes not working 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Apsche win32 Serve Side Includes - Hello Configuartion: Apache/1.3.28 (Win32) with SSI. With IE 6 an Netscape 4.75 all works fine. With Mozilla 1.4.1 or Netscape 7.1 I can only see the source code. Is it a bug in apache.conf or in mozilla- Who can help me ps. without ssi all works fine....

Server-side image editing - Hi, I want to have .gif images that are asked from my apache server to have their color palette modified (as the whole site's color palette modifies itself now) before they are sent as an answer. How can I do this? I understand there are things like gdm...

Apache Server side include character limits - I was wondering if there is a way to change the character limit on a server side include. I was including a page and it cuts off at 32000 characters. is this a default that can be changed? Any help would be great! Corey

Trouble displaying ~userdirs - hi all. I install apache2 under gentoo. install went fine and test page comes up fine. now when i want to bring up a users home dir. i get a forbidden error. i've tried adding a default page to the home dir. eg in commonapache2.conf it already has... ###...

having trouble with apache 2.0 and handlers - I was using apache 1.3.xx a while. Then I desided to upgrade to apache 2.0.xx. but I have a problem with handlers! My configuration was like this ..htaccess <font color=brown> ; ; ;>>>>>>>>>&gt...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]