httpd.conf file trauma enabling SSI

hagar's picture

They have: 104 posts

Joined: Oct 2002

Hey folks im having trauma enabling SSI on my Apache 2.0.43 server.
I want to use includes like these

in php pages instead of using

<?//include '/includes/header.php';?>

but the beauty is, I cant get it to work, and it seems includes wont work even in a normal shtml file either. This is built on a win machine btw. If anyone can lend a hand with me editing this httpd.conf to get includes working, id appreciate it... any tutorials on the conf file would be good too.

here are some of the hilights of the conf file im using, badly butchered.

Options Indexes FollowSymLinks MultiViews +Includes
AddOutputFilter Includes html
AddOutputFilter Includes php
AllowOverride All
Order allow,deny
Allow from all

# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddOutputFilter INCLUDES .php

PS php is installed as a CGI and not an apache module.

PSS seems no matter what I do, the include commands DO NOT return any errors, the includes are simply not there once the page is served. I thought that was rather weird myself.

"I ’ll make thee glorious by my pen, And famous by my sword." - James Graham, Marquess of Montrose (1612–1650)

hagar's picture

They have: 104 posts

Joined: Oct 2002

seems to be treating the commands as plain text, its viewable in the text output.

Untitled Document

hagar's picture

They have: 104 posts

Joined: Oct 2002

hmm ok, ive worked out that I was setting the wrong directory with the wrong settings, have reversed that, now have setup the root directory with the correct settings

Options Indexes FollowSymLinks IncludesNoExec
AllowOverride All
Order allow,deny
Allow from all

this seems to work now for normal shtml files, but php files still wont seem to enable includes in any format other then
<?include '/includes/header.php';?>
, any ideas?

"I ’ll make thee glorious by my pen, And famous by my sword." - James Graham, Marquess of Montrose (1612–1650)

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.