Ok, “You’re blind.” Ha Ha, old joke, and I’m just kidding .
The place to change the PHP setting is not obvious to many, especially if you are new to the Dreamhost Panel. A choice was offered when you added the domain, but after that it is hard to find (to change your original choice).
You can change which version of PHP5 your domain uses, and what user it runs under. as well as things like whether “Extra Web Security” (mod_security) and FastCGI are enabled for the domain as follows:
Go to Domains–>Manage Domains on the COntrol Panel
Look at the list of hosted domains, and find the “edit” link to the right of the domain you wish to change, and click that link.
Make changes in the resulting screen, as desired, for the above mentioned settings (and anything else you want to change) and “submit” the form via the submit button at the bottom of the page.
Allow time for the changes to take effect - usually within 10 or 20 minutes, but it sometimes takes longer. You can check whether of not the changes have taken effect by again visiting the Manage Domain screen and seeing if the “clock” icon (which indicates a change has been requested and is “waiting” to be completed) is present next to the domain name. When the “clock” icon disappears, upon a subsequent visit to the page or a refresh, the changes are “good to go”.
The main reason that Dreamhost uses PHP-CGI is that running it under suEXEC, as Dreamhost does, enhances security considerably by allowing PHP to run as your user as opposed to running as the Apache user (which it would do if run as mod_php). This allows you to keep much tighter permissions on your files and directories, and allow Dreamhost to track resource usage by user (which is very important for all of us on a shared server).
There have been other reasons pointed out from time to time, including the fact that a reasonably secure mod_php requires disabling many more php functions that on running as CGI.This from the Dreamhost wiki:
I think Dreamhost has done a pretty good job of keeping users informed of the reasons and logic behind their decisions in this regards. You might find certain articles in the Dreamhost Wiki enlightening on all this, for example, the following is found in this Dreamhost WIki Article on CGI, PHP & Databases:
The benefits of running PHP-CGI are:
It is more secure. The PHP runs as your user rather than dhapache. That means you can put your database passwords in a file readable only by you and your php scripts can still access it!
It is more flexible. Because of security concerns when running PHP as an Apache module (which means it runs as our dhapache user), we have disabled a number of commands with the non-CGI PHP. This will cause installation problems with certain popular PHP scripts (such as Gallery) if you choose to run PHP not as a CGI!
It’s just as fast as running PHP as an Apache module, and we include more default libraries.
Note: This article is somewhat dated. It is my understanding that “newly created” accocunts (within the last “several months”) no longer have the ability to “switch” to running mod_php as described in the wiki article article. This is because the Apache module is not installed on the newer servers. While that ability is (or was) present on some of the older server configurations, and was left there to avoid breaking installed scripts that were originally configured to run under mod_php for “back in the day”, the article warns that such “swithcing” is unsupported and may not always be available. As servers are “upgraded”, and for all “new” servers,
mod_php is no longer available.
There is quite a bit of discussion of all this in various threads in the forum (including my earlier post in this thread - note the link in that post to “the end of mod_php” discussion in the “archive” of the old “Dreamhost Knowledge Base” (replaced by the wiki) but still available for “historical purposes” at blog.dreamhosters.com