Run PHP as CGI


#1

Hi,
I read the wiki but can’t seem to find the checkbox to uncheck “Run PHP as CGI”. I need this off to try ELGG out.
It’s supposed to be under Manage Domains after clicking the “Edit” link, but I can’t find that option anywhere.

Thanks


#2

The only thing you can try is adding the following run-time directive to an .htaccess file:AddHandler application/x-httpd-php .phpThis is unsupported and may not even work on all machines.

:cool: [color=#6600CC]Atropos[/color] | openvein.org


#3

I’m not sure about this. But if I enable FastCGI support in DH panel --> Domains --> Manage Domains, does it mean that I’m running PHP as CGI?

Save [color=#CC0000]$97[/color] (max discount) on dreamhost plans by using promo code: [color=#CC0000]97CRAZY[/color].


#4

Yes. A PHP interpreter is run in a separate process as than the web server and is somewhat persistent. This is obviously not the same as running PHP as a module. Another difference is that the FastCGI application (eg PHP) can be running on a different host even since there is a defined protocol.

:cool: [color=#6600CC]Atropos[/color] | openvein.org


#5

Yes, but PHP will be running as CGI regardless of whether you enable or disable FastCGI support.

If I recall correctly, you used to be able to choose between running PHP as either CGI or an Apache module via the panel, but this is no longer the case. These days, the only way to run PHP as an Apache module is to add the .htaccess line that Atropos7 posted above.

There is some more information on this in the wiki article linked below;

http://www.wiki.dreamhost.com/index.php/KB_/Web_Programming/_CGI,PHP&Databases/_PHP#What.27s_the_difference_between_PHP-CGI_and_PHP_as_an_Apache_module.3F

Mark

Edit: Beaten by Atropos7 :slight_smile:

Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)