PHP/fastCGI confusion


#1

I read in the December 2008 Dreamhost Newsletter it was said that PHP was now running fastCGI. I am confused by this. Does this mean that PHP is simply compiled with fcgi support or does it mean that any .php file called by the webserver is run as a fcgi process? In other words, is there still a need to manually create a wrapper and modify the .htaccess file to get it to work?

Additionally, does marking the “Enable FastCGI support” in the web admin panel do anything to that (eg. disable any auto fcgi support in preference of manually creating wrappers, etc).

The newsletter was rather vague… Also, I was a little disturbed by his dog’s (and possibly his own) fear of fecal matter (haha).


#2

One way to check if your server is playing under fcgi without wrapper direction would be to create a temporary wrapperless site (advanced oneclick WP or something), pull up $top in a PuTTy window, and watch it when you browse to your new site. If fcgi is on by default you should see a couple/three fcgi processes appear.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

Thanks.

All I saw was one “php.cgi” appear. I take it that means a wrapper still needs to be made for it to work. PHP was just compiled for fcgi I guess.


#4

Could be that it’s the default for the newer Etch servers.

I’m on an older Sarge (and very happy with it too I might add!)

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

I like my hosting too (and I appear to be on Sarge as well). I was just mainly pointing out that they should have either:
A. Given more info on what exactly ‘globally using FastCGI to process PHP’ means.
B. Not announced the global availability of a feature not globally available.

Especially since they claim PHP is faster.


#6

Just for reference here’s the portion of the newsletter about php fast cgi (Saturday, January 10, 2009):
########################################################################
3. New… Faster PHP Everywhere!

Yesterday when I was at home sick with my crazy pooping virus, I let my
dog Salt out onto our balcony where he apparently likes to take in the
cool Santa Monica breezes and smell the cars go by. Sometimes he likes
it so much, he can’t be bothered to come inside and ask to go out, so he
just poops right out there.

Well, after a few minutes, he let out a couple of barks. That was sort
of weird… he sometimes barks at cars when we’re on a walk, but never
from the balcony. After another minute he barked a few more times.
Weird. Finally, when he barked again, I went out to see what this fool
dog was up about!

When I got out there, I saw, surprise, surprise, that Salt had already
done his “business” and was standing on the far side of the balcony,
facing the doorway. Well, fine. I got a paper towel and cleaned up his
mess. After I was done, Salt went back inside and promptly fell sleep.
That’s when it hit me… he had been calling for help after being TRAPPED
ON THE BALCONY BY HIS OWN POOP!

In related news, we are now using Fast CGI to process PHP everywhere,
which pretty much is just a win win win thing. There’s nothing you need
to do, and whether you notice it or not, I cannot say. In fact, we’d
been doing this already as sort of a test for anybody who signed up in
the last eight months or so, but now it’s UNIVERSAL!

########################################################################

The Dreamhost wiki still has instructions for using fast cgi here:

My questions would be:

  1. Do we need to enable fast cgi in the panel under Domains - Manage Domains - Edit - FastCGI Support checkbox?
  2. Do we need to follow the directions in the wiki and create a FastCGI wrapper file and add some lines to our .htaccess file?
  3. This wiki page (http://wiki.dreamhost.com/FastCGI) claims:
    On DreamHost PS FastCGI is handled by mod_fcgid rather than mod_fastcgi. DreamHost has also started the process of migrating the shared hosting servers.
    Is this migration complete now then?

Josh says “everywhere” and “there’s nothing you need to do” and if that’s true the wiki pages are out of date, so I’m just checking.