I’d like to continue running PHP-as-CGI because I’m using exec() in a couple of places, but I also want to start using auto_prepend_file and auto_append_file to insert code into every page on my site. It is my understanding that under Dreamhost’s setup, the only way to use these functions is if you run as PHP as an Apache module.
There were a few mentions in the KBase about ways to selectively run PHP as Apache, such as adding this line to htaccess:
AddType application/x-httpd-php .php
… which apparently turns on PHP-as-Apache in selected directories.
Or this line:
AddType php-cgi .php
… which apparently turns on PHP-as-CGI in selected directories.
Soooooooooo… is the best way to achieve what I want to achieve simply running PHP as Apache sitewide and then adding the “AddType php-cgi .php” line to the directories where I need to use things like “exec()”? These are generally just directories of images which don’t require my auto_prepends and auto_appends.