I’m wondering if there’s a way to use PHP scripts in a normal HTML file, same as you can do with SSI.

I’ve even tried including a PHP file using SSI, and it doesn’t work. It just puts, as text in the page: “[an error occurred while processing this directive]”. The tag I used to do this was (without the space before the !, of course):

< !–#include virtual=“HelloWorld.php”–>

I just want the possibility of using PHP in all my pages, without having to change their names.


As far as I know, and i’ve been working with php for a lone time, you can not include it using ssi. If you can then please, share the secret. But, you can, with only changing their extensions, use the php command to include other php files. but of couse the file using the include will have to have the compatible php extension. I believe dreamhost supports .php, .php3, .php4 and .phtml.

Hope it helps at least a bit.

doing all of those following to the .htaccess file would allow you to include file extensions not supported by dreamhost to be parsed by php. you could, in theory if the dreamhost servers dont like the taste, include .html and .htm in the .htaccess file like so:
[color=#0000CC]AddType application/x-httpd-php .html .htm[/color]
and the regular html files would be parsed as php files. i have tried this on my home computer running sambar and it didn’t like it one bit, but then again thats windows and dreamhost is linux.

As I said in the post, I haven’t been able to do it with SSI.

I’ll try to use the .htaccess trick. I already did it for the SSI, so it might just work.

Thanx for taking the time to reply.


Thanx, those were some interesting threads.

At least, I see I’m not the only one… :slight_smile:


you know its not working when it comes up and tries to save the file. that means it either a) doesn’t like to allow you to specify alternative extensions [expecially ones that are preset by the server; in this case apache] or b) the .htaccess file was not programmed(typed) correctly.

Those are the same problems I had with my sambar server. I can’t try in on dreamhost yet until I get back to my computer. But i’m leaning more towards the area that it might not like it very well, apache that is.