Newby seeks enlightment on FastCGI

Ryan Schmidt ryandesign at macports.org
Sat Mar 31 16:05:41 PDT 2007


On Mar 31, 2007, at 15:57, John Korchok wrote:

> When I try:
> port install php5 +apache2 +mysql5 +fastcgi
>
> I get:
> Error: Variant apache2 conflicts with fastcgi
>
> Previously I thought this just meant that FastCGI was not written  
> for Apache
> 2 yet, but it seems that it is. What does this message mean?
>
> Thanks for any and all help.

It means that I need to get off my @$$ and make it possible to  
install both the apache2 module and the fastcgi binary at the same  
time. The php5 configure script makes it a little difficult. But I  
will do it soon, because I need it myself.

However, to explain what the variants do:

+apache2 installs the php5 apache module for apache2 (/opt/local/ 
apache2/modules/libphp5.so). If you want to use php5 from apache2 as  
an apache module, then this is the variant you want. This is the way  
that most people will want to use php5 within apache2. If you don't  
know whether you should use fastcgi or the apache module, go for the  
apache module.

+fastcgi builds the php binary with fastcgi support (/opt/local/bin/ 
php-fcgi). If you want to use php5 from a fastcgi-capable web server,  
then this is the variant you want. lighttpd is one such web server.  
apache and apache2 also support the fastcgi interface, and if you  
only want to use php5 from apache or apache2 through the fastcgi  
interface (and not through the apache module interface), then you do  
not need (and should not use) the +apache or +apache2 variants, and  
should only use the +fastcgi variant. You will need to configure the  
fastcgi stuff yourself; the php5 port makes no attempt to do so for  
you, nor does it print instructions on how to do so, because frankly  
I don't know how to configure apache in that way.

The reason I personally would like to use both +apache2 and +fastcgi  
is that I would like to have the php5 apache2 module for apache2, and  
the php5 fastcgi support for lighttpd. Yes, I have both apache2 and  
lighttpd installed and running simultaneously, each for different  
purposes.





More information about the macports-users mailing list