Php5 parse .htm

hello, I need php to parse *.htm files so I made the following htaccess file

AddType application/x-httpd-php .htm .html

and it worked except it runs php 4.x.x and I need to run 5.x.x. I have the domain set to run 5. I have also tried the following

AddHandler phpFive .php .htm
Action phpFive /usr/local/dh/cgi-system/php5.cgi

to no avail. Anybody have any idea?

Just to be sure, if you create a file info.php with <?php phpinfo(); ?> in it, does it show that you’re running php5?

Actually, it’s a lot easier than that! :wink: . Try this in your .htaccess file:

AddHandler php5-cgi .html .htm .php

…that’s all you need, and you are “good to go”. This is in the Dreamhost Wiki article on Web Programming / CGI, PHP & Databases / PHP, under the sub-heading, " What extension should my php files have?" I just tested it, and works great. Good Luck!


that worked. Thanks!