| PHP-CGI vs. PHP-Apache (2) | Monday, Jun 12, 2006 10:08 am |
This is a new topic for me, and it's slightly above my current level of understanding. But despite that, I'll try to throw some information out there.
Some web hosts have the option of executing PHP as CGI or executing it as an Apache module. DreamHost has PHP-CGI enabled by default. Despite this being "more secure", it causes some pretty major problems. The biggest problem is that scripts keep making calls to something called "/dh/cgi-system/php.cgi". I don't know what that is, but I know it's been mentioned on forums for WordPress, Zenphoto, Drupal, and many others. And I've experienced this same problem when I've tried to install and setup several PHP scripts.
I know how to "fix" it: In the DreamHost control panel, go to Manage Domains, and edit the domain in question. Change the PHP version from 4.4.2 to 5.1.2 (these values will probably change as DreamHost upgrades to newer versions). As this WordPress support page says, DreamHost runs PHP 4 as CGI and PHP 5 as an Apache module. For whatever reason, PHP running as CGI makes certain things not work. And all I know is that running PHP as Apache makes everything work like it used to.
Linked: Referral programs
Something wrong on the WordPress support page...
PHP5 is always running as CGI on DreamHost. You used to have a selection of Apache or CGI for PHP4, but now CGI is the default for PHP4 as well.
See DreamHost PHP versions for more info...
Yeah I can't vouch for the accuracy of the WordPress support page, but I do know that the "fix" seemed to "fix" things. Good enough for me.