Tech Blog :: Old-school SSI on PHP5/Apache2.2
Old-school SSI on PHP5/Apache2.2
I had to set up a local copy of an old site running (on the server) PHP 4 and hundreds of old-school SSIs (server-side includes), of the <!--#include variety. It took a bunch of time to get it right, but in the end it's pretty simple:
- Make sure
mod_include is enabled in your httpd.conf.- Have this directive in your httpd.conf (it should be possible in the virtualhost or .htaccess too but doesn't work there:
<Directory /> Options Includes </Directory>
- Also in httpd.conf, put the directive
SetOutputFilter INCLUDES.Prior to PHP 4.6 I think, there was a configuration directive --enable-track-vars which allowed SSI variables to work PHP, or something like that, but it's deprecated and built in now, so PHP can output SSI directives.
Make sure to restart Apache after adding this, of course.
If I run into other issues with this, I'll update this post; in the meantime, it seems to be working.
Google: TheBuckSt0p
Facebook: BenBuckman
LinkedIn
Github: newleafdigital
@thebuckst0p
Delicious: thebuckst0p
Drupal.org: thebuckst0p
Post new comment
Don't bother putting in spam links. They'll be set to
rel=nofollowand will be removed and reported as spam shortly after submitting.