Need help with SSI #include


Hopefully I can articulate the problem. Until yesterday, several/all of my site’s pages used the SSI script !–#include virtual . . ., and it worked fine. Today my site crashed. The Dreamhost team was very helpful in helping me fix that, and I’m mostly back up. But now none of my SSI script is working; the content is not being incorporated.

I believe the only change (other than removing a self-imposed disk quota! D’oh!), was (I have to quote b/c I don’t understand it all): “I switched you to php5, created an .htaccess with addhandler and addtype . . .” Could that have caused by SSI script to stop working? Any advice?

Thank you very much,

Confused in Charlotte

I was going to guess .htaccess. If you had a .htaccess file before, it may have had settings you may still need.

Did they explain what caused the crash? Switching to php5 often indicates a server change.


DreamHost doesn’t support mod_php anymore, so if you were counting on using SSI in PHP scripts you’re out of luck. Also the default extension for parsing files is .shtml so if you were using a different extension you need to update the .htaccess file. And don’t forget to check the error logs.

:cool: -//-

Thank you. How do I find the error log? (Yes I’m THAT in the dark)


With SFTP or shell, login as the FTP user for that domain and the logs are in the kinda obvious
/home/username/logs/ directory.

:cool: -//-

Thank you very much for the help. With your help and the help of Dreamhost it looks like it’s been fixed. I don’t fully understand the cause/answer (I need to read up on php5), so I’ll copy their note here and I would appreciate any feedback on what this means. Thanks again.

Here’s the answer that worked:
"[he] switched you over to PHP5 and added a few lines to your .htaccess file:

AddType php5-cgi .shtml .htm .html

AddHandler php5-cgi .shtml .htm .html

The AddHandler line was the one that was causing problems for your .htaccess files. I went ahead and commented that out to disable it and it looks like things are loading properly now!"

That issue didn’t have to deal with PHP as much as you think. The .htaccess files are technically called per-directory confirguration files and they affect the web server software, Apache 2.0

If you had read the documentation for Apache 2.0 for the AddHandler directive, you would realize that you are basically telling the web server to run the files through PHP instead of parsing them for SSI.

You might be able to both CGI and SSI if you do the SSI as a filter.

:cool: -//-