logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Problem with SSIs
Author
Rahul



Joined: 11 Jun 2007
Posts: 9

PostPosted: Wed 13 Jun '07 19:21    Post subject: Problem with SSIs Reply with quote

I am trying to configure Apache to recognize Server Side Includes in my .html files (written using xHTML Transitional).

I have confirmed the following checklist with my configuration:
1) httpd.conf file includes the line
LoadModule include_module modules/mod_include.so

2) httpd.conf file contains the directive
Options +Includes

3) httpd.conf file also includes the directive
AddType text/html .html
AddHandler server-parsed .html

4) Finally the .htacces file where the source html file with the include directive resides also contains the directive:
Options +Includes

Still, the include directive in the .html file
<!--#include virtual="Sample.html"-->
is not being parsed by Apache & is being passed as it is to the client.

So, can anyone tell me the solution???
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Wed 13 Jun '07 21:17    Post subject: Reply with quote

You neglected to tell us what version of Apache you are using (see the Forum Rules),
but your configuration looks like it follows the SSI instructions for Apache 1.3.

If you are using Apache 2.2, be sure to follow the SSI instructions for Apache 2.2.

Apache 2.2 uses an output filter, so you will need the directive:
Code:
SetOutputFilter INCLUDES .html
instead of:
Code:
AddHandler server-parsed .html


-tom-

p.s. It is seldom a good idea to enable SSI for all .html files.
More commonly, a .shtml extension is used for pages which contain Server Side Includes.
Back to top
Rahul



Joined: 11 Jun 2007
Posts: 9

PostPosted: Thu 14 Jun '07 15:08    Post subject: Reply with quote

I made the change you advised, then stopped the server. But it is now simply not restarting.

When I revert the settings, the server starts successfully.
By the way, my server version is 1.5.3a.
Also, I checked out the error log, & found the following message multiple times in it. Can you dissect it for me:
mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 14 Jun '07 16:54    Post subject: Reply with quote

re: "my server version is 1.5.3a"
The number 1.5.3a is not an Apache version. I suspect you are running XAMPP version 1.5.3a, which includes Apache version 2.2.2 along with PHP and MySQL.
If this is right - you need to use the SetOutputFilter... directive instead of AddHandler...

.htaccess files (not .htacces) are seldom used on Windows, although it is possible to do so. Maybe you are running on Linux or some other Unix.

If you are using .htaccess files, try putting both SetOutputFilter... and Options +Include in the .htaccess file.

Also make sure that the <Directory> block for this directory in your httpd.conf file contains AllowOverride Options (or contains AllowOverride All).

As an alternative; you may wish to avoid using .htaccess files entirely, and place everything (SetOutputFilter... and Options +Include) inside the <Directory> block for this directory in your httpd.conf file.

-tom-
Back to top
Rahul



Joined: 11 Jun 2007
Posts: 9

PostPosted: Fri 15 Jun '07 7:28    Post subject: Reply with quote

Thank you very much. It finally worked with inserting the SetOutputFilter directive inside the directory block.

And, I did not recognize that I was using an outdated version of Apache. So, I have downloaded Xammpp 1.6.2.

By the way, will this AMP combination also install & work on Vista successfully???
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Fri 15 Jun '07 9:43    Post subject: Reply with quote

There are maybe some touble with the UAC = User Account Control
So you maybe have to set permission for xampp\htdocs. Another way is to turn off UAC. (can be done with msconfig)
Back to top


Reply to topic   Topic: Problem with SSIs View previous topic :: View next topic
Post new topic   Forum Index -> Apache