[Nix-dev] PHP 5.3 with fastcgi support

Alexander Foremny alexanderforemny at gmail.com
Wed Jan 16 11:49:49 CET 2013


Dear list,

I am currently trying to build PHP with fastcgi support. I did all
following changes to Nixpkg's master PHP expression.

As of PHP 5.3 [0] it appears as if fastcgi support is enabled by the
--enable-cgi or --disable-cgi option. The documentation is not that clear
about wheater --disable-cgi enabled fastcgi or if --enable-cgi does, at
least to me.

In general I added fcgi to the arguments of PHP's Nix expression. I added
the following attribute set to the flags attribute.

> fastcgi = {
>   configureFlags = [ "--enable-cgi" ];
>   buildInputs = [fcgi];
> };

And I added the following attribute set to the cfg attribute.

> fastcgiSupport = config.php.fastcgi or true;

Out of confusion about the configure flags I tried a combination of all
available and also deprecated configure options. Those do show up on the
build and the build proceeds fine in building PHP.

However, in every configuration I tried there appears to be no fastcgi
support in PHP. I for instance checked with

> % php -v | grep -i cgi

which should output something like PHP (cgi-fcgi), but it doesn't. Also
there is never an executable produced called php-cgi, php-fcgi or
php-fastcgi. Additionally the php binary never links against any fastcgi
library.

I tried various combinations of the command line options with the
--with-fastcgi=${fcgi} or --with-fastcgi=${fcgi}/bin/cgi-fcgi even though
this configure flag is deprecated as of PHP 5.3. Perhaps unsurprisingly
this didn't have any effect on the build.

Since I hardly find and documentation on this issue I'm starting to suspect
that this is caused by some profound misunderstanding of something related
to PHP and/or fastcgi.

Any insight in this would be appreciated!

Regards,
Alexander Foremny

PS. I don't necessarily depend on PHP 5.3, only on a version later than or
equal to 5.2.1. Since the Nix expression involved patches PHP's configure I
didn't bother to try to patch any other PHP version myself.

[0] http://php.net/manual/de/configure.about.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20130116/6e2dd85f/attachment.html 


More information about the nix-dev mailing list